Normally Google conversion code is added in header or footer of the “Thank you for your purchase” pages. A conversion is logged when someone lands on such thank you pages. But what if you want to notify Google about a conversion when a certain event is triggered like Sigup, Buy Now or Register button is clicked. Below is the code that can be used to create event based Google conversion. Now you can call
var google_conversion_id = 1234567890; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = ""; var google_conversion_value = 0; var conversionLabels = { 'order-success': "conversoin_label_here" }; function trackConversion(label) { google_conversion_label = conversionLabels[label]; document.write = function(text) { $('#content').append(text); }; $.getScript('https://www.googleadservices.com/pagead/conversion.js'); }; /* then somewhere in your ui code: */ trackConversion('order-success'); trackCoversion on any event to trigger Google Conversion.
Trigger Google conversion on some event
Normally Google conversion code is added in header or footer of the “Thank you for your purchase” pages. A conversion is logged when someone lands o
Work with Scriptbaker
Let's talk about your project
Whether you're extending an existing platform, modernising legacy code, or planning something new, our engineers can help. Tell us what you're working on and we'll explore a practical technical solution together.
Related posts

Transaction Processing System: How It Works, Benefits, and Why Businesses Need One
Discover how a transaction processing system works, its main components, types, ACID properties, and business benefits. Learn why custom transaction processing software can help businesses automate operations, improve data accuracy, and manage growing transaction volumes.
Lamudi.pk Real Estate Growth
There are several online real estate portals running in Pakistan, a couple of them have captured the market and leading the industry. In such a scenario it’s ha

My 3 Days Trip to Swat, Malam Jabba and Kalam
Pakistan is a land of natural beauty and has been blessed with the abundance of awe-inspiring outdoor areas. From the unspoiled golden beaches,across the desola