Post by ASG » Fri Jan 29, 2016 7:22 pm

I had been looking for an answer to this for last couple of days, and almost all of the solutions I came across involved modifying code in the tpl files. And even then it wouldn't work depending on the Opencart version you had.

So I requested support from Google adwords team, and their integration team called me up. You can follow the following steps to have adwords conversion tracking added for your site. It is as easy and similar as integrating Google analytics code. Also, it is provided by Google themselves, and has been working like a charm for me.

1. Get the conversion code which should look like the following:

Code: Select all

<!-- Google Code for Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "K4nGDFGS6xWMQAsaa2AM";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/1234567890/?label=K4nGDFGS6xWMQAsaa2AM&guid=ON&script=0"/>
</div>
</noscript>
2. Login to your site's admin. And head to SYSTEM > SETTINGS > SERVER TAB.

3. Scroll down to Google Analytics section. (Yes, you read that correct - the Analytics section)

4. Copy the following line from the above code:

Code: Select all

src="//www.googleadservices.com/pagead/conversion/1234567890/?label=K4nGDFGS6xWMQAsaa2AM&guid=ON&script=0
5. And modify it to the following code:

Code: Select all

<script type="text/javascript">
setTimeout(function(){ 
if(window.location.href.indexOf('route=checkout/success')>-1){
(new(Image)).src="//www.googleadservices.com/pagead/conversion/1234567890/?label=K4nGDFGS6xWMQAsaa2AM&guid=ON&script=0";
}
}, 1000);
</script>
6. Now, paste the entire script(including <script></script> right below where the analytics code ends. And hit Save.

That's it. You can check functioning of the same using google tag manager extension in Chrome, or Tools > Conversions in the adwords dashboard.

ASG
Active Member

Posts

Joined
Tue Sep 30, 2014 11:03 pm

Post by EvolveWebHosting » Sat Jan 30, 2016 1:11 am

That will work or you can use Google Tag Manager for your analytics, adwords, etc.

I just set another one up yesterday and it was easy to do.

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhosting.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by st_man » Tue Mar 01, 2016 4:28 am

What if I have 3 or 4 google ads and am testing them to see which produces "checkouts" best. Would I put the code in 3 times, once for each ad or would that trigger a success for all the ads?

New member

Posts

Joined
Sun Jan 26, 2014 6:13 am

Post by Jaap » Thu Oct 27, 2016 12:34 am

This solution is working almost perfectly.
But ...
I set up everything as described and in Google i choose the option:
everytime another value if not, value €20.=

But al my conversions are €20.=, where i like to have the sales value showing up.
Am i doing something wrong, or should i change something in the code?

User avatar
Active Member

Posts

Joined
Fri Apr 15, 2011 12:10 am
Location - the Netherlands

Post by DavetheCat » Fri May 05, 2017 8:14 pm

Hello,
I need to add Adwords conversion tracking code to my OC shop (v2.1.0.1) but I can't see a "Google Analytics" section in my 'Settings' > 'Server' area. Is the Google Analytics area somewhere different in my OC version, or should I put the code in elsewhere? I'm quite happy to add it into a tpl file if needed, but I don't know which file to go to.
Any advice on this appreciated!

User avatar
New member

Posts

Joined
Wed Nov 04, 2015 2:44 am

Post by Ricky112 » Mon Oct 02, 2017 8:01 pm

I have a similar question to the AP.

I want to set up Adwords conversion tracking and have somewhere to enter the profit I make on each product so I can make a profit/loss analysis drilled down by product.

I cannot see this feature on any of the extensions.

We can code it in-house if necessary but wondered if anyone had any tips ?

Newbie

Posts

Joined
Thu Aug 04, 2016 1:07 am

Post by lucibfp » Thu Nov 23, 2023 10:15 pm

I have tried very hopefully, but I don't have an analytics section at all in my settings.

Not even my developer nor google can understand why my conversions aren't working...

Newbie

Posts

Joined
Fri Apr 10, 2015 5:44 pm

Post by paulfeakins » Fri Nov 24, 2023 12:12 am

lucibfp wrote:
Thu Nov 23, 2023 10:15 pm
I have tried very hopefully, but I don't have an analytics section at all in my settings.

Not even my developer nor google can understand why my conversions aren't working...
You're replying to a very old topic, what version of OpenCart are you on?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Bing [Bot] and 313 guests