Has anyone had any experience implementing a Google AdWords Conversion Tag on click of a link or button using DTM?

Avatar

Avatar
Validate 1
Level 3
flandyroyd
Level 3

Likes

22 likes

Total Posts

20 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
flandyroyd
Level 3

Likes

22 likes

Total Posts

20 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
flandyroyd
Level 3

08-04-2016

I’m trying to throw a tag on click of a button (due to the way the experience is built, this is my only option…) to capture registrations.  I'm not sure how to create the on-click event in DTM.  Below is the code and full instructions from Google.  Any guidance or help pointing me in the right direction would be HUGELY appreciated.

Thanks!

----

Below is the Google AdWords Conversion Tracking code for conversion action Quick Registration. For the tracking to work, you'll need to make sure you include both the code snippet and the appropriate 'onClick' tags from one of our examples. This tells AdWords to record a conversion only when a customer clicks on a specific phone number. If you don't include an 'onClick' tag in your HTML, no conversions will be registered.

For examples see https://support.google.com/adwords/answer/86276?&hl=en_US.

<!-- Google Code for Quick Registration 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 = 933120834;

     w.google_conversion_label = "N65LCNWl82IQwpb5vAM";

     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>

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

24-04-2016

Hi Randy, 

Please create the event based rule for the onclick event on Quick Registration  action. There is no need to enter the custom code in the Adobe Analytics  section of the event based rule . Please add the below code in Javascript / Third party Tag section of Event based rule as "Sequential Javascript" .

<script type="text/javascript"> /* <![CDATA[ */ goog_snippet_vars = function() { var w = window; w.google_conversion_id = 933120834; w.google_conversion_label = "N65LCNWl82IQwpb5vAM"; 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>

Please do let us know if any help is required with the "Condtions" section of event based rule.

Thanks & Regards

Parit Mittal

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 3
flandyroyd
Level 3

Likes

22 likes

Total Posts

20 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
flandyroyd
Level 3

Likes

22 likes

Total Posts

20 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
flandyroyd
Level 3

19-04-2016

Hi Tacia,

Thanks for the response, but this doesn't fully answer my question.  The above implementation appears to require custom code, and I'm not exactly sure what that should look like.  On Click of the link, I need to make sure that goog_report_conversion is called.  Any idea what that should look like in the code?  Obviously, I'm not a coder.  😞

Thanks!

Avatar

Avatar
Validate 1
Level 7
taciac
Level 7

Likes

17 likes

Total Posts

341 posts

Correct reply

188 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 7
taciac
Level 7

Likes

17 likes

Total Posts

341 posts

Correct reply

188 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
taciac
Level 7

08-04-2016

Hi Randy,

You can accomplish this with an event based rule on the click and then add the extra code in the javascript section at the bottom of the rule. There is a video for creating event based rules here: https://outv.omniture.com?v=t1aTY4ZzrSWZE4iueJ54dLXMDI_Znldy. The documentation for event based rules is here: https://marketing.adobe.com/resources/help/en_US/dtm/rules_event.html.

Let me know if that doesn't work.

-Tacia