Technology Services

JavaScript onClick Google AdWords Conversion Tracking

Original posted on Erik Vold’s Blog

This is really just a technique to convert the provided Google AdWords Conversion Tracking Code into something more a little more useful.

Take the conversion code provided, usually something like:





]]>

And convert it into this:


var uniqueConversionFunctionName = function(){
var image = new Image(1,1);
image.src = “http://www.googleadservices.com/pagead/conversion/1234567890/?value=1&label=Purchase&script=0”;
return;
}

]]>

Notice that in the second block of code above, I’ve taken the source of the image which was provided by Google in the first block of code’s noscript tag.

That’s it! with this your Google AdWords conversion no longer has to be a landing page, it can be a button click event, or whatever else you want it to be.

Cardinal Path

Share
Published by
Cardinal Path

Recent Posts

Google Delays Third-Party Cookie Deprecation to 2025

Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…

6 days ago

Understanding Funnel Reports in GA4

Funnel reports have long been one of the most actionable reports in a marketing analyst’s…

1 week ago

GA4 Monetization Reports: An Overview

GA4’s Monetization reports provide organizations with simple but actionable views into the revenue-generating aspects of…

2 weeks ago

This website uses cookies.