Analytics
2.2K members online now
Discuss discrepancies between AdWords and Google Analytics data, linking AdWords and Google Analytics, importing your goals/Ecommerce transactions into AdWords, and setting up Remarketing
 
Guide Me
star_border
Reply

I am using a DNN website and when i add in the Add to cart tracking code the editor fails to work

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

this is the code that google integration support gave me but when i add it to the footer before the </body> the editor doesn't work anymore
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js">&lt;/script&gt;
&lt;script type="text/javascript">
/* <![CDATA[ */
goog_snippet_vars = function() {
var w = window;
w.google_conversion_id = 868967398;
w.google_conversion_label = "4Uz3CL-g5msQ5setngM";
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);
}
}
/* ]]> */
&lt;/script&gt;
&lt;script type="text/javascript"
src="//www.googleadservices.com/pagead/conversion_async.js">
&lt;/script&gt;

&lt;script&gt;
window.addEventListener('load',function(){
jQuery('input[src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif"]').click(function(){
goog_report_conversion();
});
});
&lt;/script&gt;

I am using a DNN website and when i add in the Add to cart tracking code the editor fails to work

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Hey Heather,

 

Hope are doing well!!

 

As my understanding you want to fire an "AdWords" Conversion Pixel whenever the user add the item in cart ?

 

If My understanding is correct then please ask you google team to share the Adwords conversion pixel and place that code into script and call on addToCart Button click.