본문 바로가기

Marketing and SEO/Google Ads

GTM - Conversion (Cafe 24 Individual Product Purchase)

반응형

When you link Google Ads and Cafe 24, you get a bunch of conversions automatically including purchase. A purchase conversion is usually masured by one purchase as a whole not by individual items. But what if you want to measure the purchase of each item as a conversion?. I will show you how using Google Tag Manager (GTM)!

 

Let's go over how it is going to be implemented, first, we need to create a conversion action in Google Ads then we have to set up a corresponding tag with a trigger for that action in GTM. To reduce a repatitive work we will create a item identifier to specify each item using product Id that Cafe 24 provides.

Creating Conversion Action

First, click the link below and create a conversion action manually. Set the value for the conversion 'dynamic' as this is for the purchase

https://jin-co.tistory.com/5#ct-setup-web-manual

 

구글애즈 전환 설정하기

구글애즈에서 전환은 웹사이트 방문 고객이 웹사이트에서 취하는 행동 중 광고주에게 의미 있는 행동(주로 구매 등 금전적 이익을 주는 행동?)을 의미합니다. 구글애즈에 전환설정으로 광고를

jin-co.tistory.com

Item Identifier Set Up(Only Once)

First, let's create the item identifier. In GTM, go to 'variable' -> 'new' under the 'user-definded variables'. 

Select 'variable configuration' box

Choose 'custom JavaScript'

Insert the code below

function() {
  var prductNumbers = []    
  for (var i = 0; i < EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.order_product.length; i++) {        
    prductNumbers.push(EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.order_product[i].product_no)
  }

  return prductNumbers.toString()
}

Type in title and click 'save'

Tag Set Up

In the GTM, go to 'workspace' ->  'tag' -> 'new'

 
Click 'tag configuration' box
 
Select 'Google Ads conversion tracking'

We have to fill in 'conversion ID', 'conversion label' and 'currency', 'value'. First, insert the 'conversion ID' and 'conversion label' from the action you created in Google Ads above.

※ If you don't have conversion linker click here to create one

Type in the currency (If your products are sold in one country, typing a hard value is easier).
For the value, we need to create a varibale to get the value of a specific item. Click the 'block' icon in the 'conversion value' box and click '+' icon on the top right corner

Select 'variable configuration' box

Choose 'custom JavaScript'

Insert the code below. Note that the number after '==' represents an item. So use appropriate id for each item.
function() {  
  for (var i = 0; i < EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.order_product.length; i++) {
    if(EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.order_product[i].product_no == 18) {
      return +EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.order_product[i].product_price   
    }        
  }      
}

Enter a name and click 'save'

 

Completed tag

Trigger Set Up

Click 'triggering' box

 

Click '+' icon on the top right

 

Select 'page view'

 

Choose 'some page views' and select 'Page URL'

Leave the second box as 'contains' (The reason why we use 'contains' is that when a user visits the site through advertisement, there is an Id attached to the URL. So setting 'equals' might not work in that case). Then fill the last box with the value below

/order/order_result

To fire the trigger on a specific item, we need anthor condition. Click '+' icon

위에서 설정해 둔 상품아이디 변수 선택 -> '포함' -> 세 번째 칸에 상품아이디를 입력합니다.

Choose the identifier we set in the beginning. Leave the second box as 'contains' and enter the product Id in the last box and click 'save'

Publish

Click 'submit'

Click 'publish'

Then choose either 'skip' or 'continue' (If you want to add message, you have to choose 'continue' though).

설치된 전환 확인하기

 

[구글 태그] 사이트에 설치된 구글 태그 확인하기

구글 애널리틱스나 애즈를 사용하려면 사이트와 해당 제품의 태그를 연결하여야 하는데요. 연결작업 후 태그가 제대로 삽입되었는지, 작동은 제대로 하는지 눈으로 확인할 수 있으면 좋겠죠.

jin-co.tistory.com

In this writing, I have shown you how to track each item with Google Ads converion on Cafe 24.

728x90
반응형