Add Google AdWords Tracking
The Google AdWords Tracking code you receive from Google should look similar to the below image.
NOTE
All of the below code is just an example - do not copy this directly into your site. Please be sure to obtain the correct tracking code from Google AdWords.
NOTE
All of the below code is just an example - do not copy this directly into your site. Please be sure to obtain the correct tracking code from Google AdWords.
<!-- Google Code for Add to Cart 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 = 12345678; w.google_conversion_label = "abcDeFGHIJklmN0PQ"; w.google_conversion_value = 13.00; w.google_conversion_currency = "USD"; 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); } } /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion_async.js"> </script>
To access the global header section, in the left panel click Settings, and then click Header HTML.
Copy the code provided by Google into this section, then click Save.
Once you have added the tracking code to the header section, you need to add code to the widget you want to be considered the tracking event.
NOTE
AdWords does not differentiate between click and load tracking.
NOTE
AdWords does not differentiate between click and load tracking.
You need to add Google's tracking on individual links. For example, if you wanted to add tracking to a button click, then you would go to the button within the editor and right-click to open the menu, and click Edit HTML/CSS.
Once you are looking at the HTML for the button widget, find the <a> tag and add the following snippet to this section.
onclick=";return try{goog_report_conversion('http://example.com/your-link')}catch(e){}"
If you did this correctly the code would look something like the below screen shot.
NOTE
The above code is just an example - do not copy this directly into your site. Please be sure to obtain the correct code from Google.
NOTE
The above code is just an example - do not copy this directly into your site. Please be sure to obtain the correct code from Google.
Considerations for Google AdWords
Google recommends using the following code:
onclick="goog_report_conversion ('http://example.com/your-link')"
The code we use also enables us to track into FS stats.