2017-01-23 108 views
0

我們網頁上有2個按鈕,我們想要跟蹤每個按鈕的點擊次數(又名轉換次數)。我爲每個跟蹤都放置了兩個腳本,但似乎每個按鈕本身的onClick操作(代碼都是鏈接的一部分)是相同的。目前Google Adwords正在註冊一個,但沒有註冊。多個Google Adwords onClick跟蹤事件在一個頁面中?

源頁上的:視圖源:http://hudsonspine.com

該代碼不登記:

<!-- Google Code for Healow Conversion Conversion Page 
In your html page, add the snippet and call 
goog_report_conversion when someone clicks on the 
chosen link or button. --> 
<script type="text/javascript"> 
    /* <![CDATA[ */ 
    goog_snippet_vars = function() { 
    var w = window; 
    w.google_conversion_id = 1037734564; 
    w.google_conversion_label = "4WXBCKnSrm0QpKXq7gM"; 
    w.google_remarketing_only = false; 
    } 
    // DO NOT CHANGE THE CODE BELOW. 
    goog_report_conversion = function(url) { 
    goog_snippet_vars(); 
    window.google_conversion_format = "3"; 
    var opt = new Object(); 
    opt.onload_callback = function() { 
    if (typeof(url) != 'undefined') { 
     window.location = url; 
    } 
    } 
    var conv_handler = window['google_trackConversion']; 
    if (typeof(conv_handler) == 'function') { 
    conv_handler(opt); 
    } 
} 
/* ]]&gt; */ 
</script> 
<script type="text/javascript" 
    src="//www.googleadservices.com/pagead/conversion_async.js"> 
</script> 

該代碼被登記:

<!-- Google Code for Zocdoc Conversion Conversion Page 
In your html page, add the snippet and call 
goog_report_conversion when someone clicks on the 
chosen link or button. --> 
<script type="text/javascript"> 
    /* <![CDATA[ */ 
    goog_snippet_vars = function() { 
    var w = window; 
    w.google_conversion_id = 1037734564; 
    w.google_conversion_label = "eAKpCJ3Jrm0QpKXq7gM"; 
    w.google_remarketing_only = false; 
    } 
    // DO NOT CHANGE THE CODE BELOW. 
    goog_report_conversion = function(url) { 
    goog_snippet_vars(); 
    window.google_conversion_format = "3"; 
    var opt = new Object(); 
    opt.onload_callback = function() { 
    if (typeof(url) != 'undefined') { 
     window.location = url; 
    } 
    } 
    var conv_handler = window['google_trackConversion']; 
    if (typeof(conv_handler) == 'function') { 
    conv_handler(opt); 
    } 
} 
/* ]]&gt; */ 
</script> 
<script type="text/javascript" 
    src="//www.googleadservices.com/pagead/conversion_async.js"> 
</script> 

W¯¯ ithin這些鏈接是爲每一個「按鈕」的功能的onClick我們要讀轉換爲:

<a onClick="goog_report_conversion('https://www.zocdoc.com/practice/hudson-spine-and-pain-medicine-3699')" class="button_ color big" title="ZocDoc" href="https://www.zocdoc.com/practice/hudson-spine-and-pain-medicine-3699" target="_self"> ZocDoc </a> 

<a onClick="goog_report_conversion('https://www.healow.com/apps/practice/jonathan-kuo-md-8333')" class="button_ color big" title="Contact Us" href="https://www.healow.com/apps/practice/jonathan-kuo-md-8333" target="_self">Healow</a> 

回答

0

我會建議跟蹤與谷歌Analytics(分析)事件跟蹤兩個不同的轉換。您可以將Google Analytics關聯到您的AdWords帳戶並導入轉化。 ga('send','event','Button-A','Click','Conversion-A','1');

相關問題