Google Adwords Conversion Code - 4.1.4

Thank you for your reply Tbirnseth

I have the Google Analytics addon enabled and the ID correctly placed there. I also have the option to track e-commerce transaction checked. I am not sure what this is supposed to do under google analytics.

However, for the conversion of google adwords google support provides a code that needs to be placed in the order complete checkout page.

After reading a lot about this in this forum I have placed a hook and the code in the order_confirmation.post.tpl as recommended on a similar post.

However, when checking no code shows in the final checkout page after an order is placed (should be the so called "thank you" page) even if the hook is in place and should be there

can you explain me better the difference between the addon and the conversion tracking code that the google support wants me to add?

please advise

thank you

If the hook is not being called, then you will have to contact the vendor of your theme to find out why. It would be very strange for a cs-cart theme vendor NOT to support the order_confirmation.post.tpl hook since that would break a ton of things.

What is the content of your order_confirmaiton.post.tpl file:

Enabling the Google Analytics addon and entering the appropriate credentials should be all you need for conversion code. You shouldn't have to add anything yourself. Are you sure you have your credentials set properly?

The addon adds the code snippet and does all the conversion code to set the products purchased, etc. properly.

Again, you shouldn't have to do anything but enable the addon and have correct settings. Only if you are using the extended ecommerce stuff and/or Google Tag Manager do you need to do anything for Analytics.

The conversion code is included in the addon.

Here is the issue that I found. The conversion code works fine when the url contains the google ad gclid variable. This is added when a user clicks on one our ads. So for example, the user would navigate to:

https://www.mysite.com/?gclid=EAIaIQobChMI25nH8avU55AIVy7rACh3pKgEAAYASAAEgKlqvD_BfO

That gclid variable is what tells google to run the conversion code javascript when the order is completed. So this variable should stay through the complete purchasing process.

Here is the problem.

From the home page, I click on a product and cs-cart redirects without including the gclid variable in the url, so it goes to: https://www.mysite.com/all-products/product1/, not including the gclid variable.

If I paste into the url: https://www.mysite.com/all-products/product1/?gclid=EAIaIQobChMI25nH8avU55AIVy7rACh3pKgEAAYASAAEgKlqvD_BfO

then when I go checkout, again it drops the gclid variable: https://www.mysite.com/index.php?dispatch=checkout.complete&order_id=9999259

How do I make cs-cart keep that gclid variable throughout the whole purchasing process, keeping it on each page the user navigates to?

Have you implemented this by inserting javascript? Or have you utilized the google_analytics addon?

I'm using javascript as explained in this thread.

You'll need to provide more details as to how you've implemented it.

Are you saving the gclid in the session or as a cookie when you see it?

What template did you modify (or hook did you use)?

Describing your problem does not always help us understand what you did that may be causing the problem.

If you're not saving gclid when it's seen then you can't expect it to magically be propagated across page loads.

Hello,

For me conversion works but ....conversions are false!

For exemple, if user choose a payment method like "Bank transfer", (status will be OPEN and not PAID) so conversion is added but it's false, because if user doesnt pay it, Google add a conversion for nothing.

So differents ideas :

- Skip the "checkout.complete" to avoid to send false datas G ads. (Create a new functionnality which said "skip checkout.complete if user select this payment method)

- Or Explain to Google, to use conversion just if status is PAID (modification of script is necessary.. but is it possible for google to check a status ? )

How do you avoid this problem on your side ?

We create a lot of quotation by using our cart, so my conversions are really false...

Thank you for your feed back and avice about it.

As far as I understand, you should wrap the code in the following file

design/themes/responsive/templates/addons/google_analytics/hooks/checkout/order_confirmation.post.tpl

with this code

{if $order_info.status == 'P'}
...template code here....
{/if}


(!) Not tested

As far as I understand, you should wrap the code in the following file

design/themes/responsive/templates/addons/google_analytics/hooks/checkout/order_confirmation.post.tpl

with this code

{if $order_info.status == 'P'}
...template code here....
{/if}

(!) Not tested

Ok thank you.. i send you a PM.