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 = “https://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.

Author

cp_admin

Share
Published by
cp_admin

Recent Posts

Search+AI: AI Visibility Starts with Smarter SEO

Shifting from Ranking to Discovery Search is changing. As SEOs, we’ve said that many times…

3 weeks ago

Amplitude’s AI Agents Are Here, And They’re About to Transform How You Work

Amplitude has officially launched one of the most exciting innovations in digital intelligence: Amplitude AI…

3 weeks ago

Sense by Contentsquare: AI That Turns Experience Data Into Action

Digital teams today face an avalanche of user data and complex customer journeys across web…

4 weeks ago

This website uses cookies.