![]() |
Need help installing Overture Conversion Counter code
I have signed up for the Overture Conversion Counter and it requires adding a little JavaScript code in between the <head></head> tags, simple enough? The only place I know to add it is in the customer/home.tpl with the rest of my JS but it needs to be on the order confirmation page only.
Here is the JS code: Code:
<SCRIPT LANGUAGE="JavaScript"> And the instructions they sent: Code:
The tag must be placed on the transaction completion page of Any help with this is much appreciated! The site this is going on is x-cart 3.4.11 |
make sure you wrap the java code in literal tags
{literal} java code {/literal} |
Where, or how could I put the code so it is placed in between the <head></head> tags on the confirmation page only?
As the instruction say, it needs to be on the confirmation page only or else it will reports inaccurate information. Could this maybe be done with a include in the .php file? and is there and easy way to do this? Thanks! |
I would think you would put it in the main/order_message.tpl file. Something like this:
Code:
{literal} |
wouldn't this just be adding Head tags to this template essentially putting in 2 sets of Head tags on the final outputed page that the customer sees?
|
That didn't work
I didn't think that having two <Head> sections would work. I tried it earlier this week but it didn't work. Google's conversion code worked on that page though.
I don't know if this will work, but this is what I did. In skin/customer/home.tpl in inserted the following code right above the closing </head> tag. Code:
{if $main eq "order_message"} Thoughts? Does anyone have another way? |
eleven...
This is about what I was thinking, I have put the code in and will be testing it a little later today. I will post the results when i'm done... Thanks for the assist! |
Any update on this one? I've got a customer who's just signed up for Overture...
|
Track both Google and Overture
I don't think it matters where you put the Overture code. From looking at the code, it should work anywhere in your order_message.tpl. I have gotten both Overture and advanced Google conversion code. It has been working fine for us within the body of the page. Here's what my order_message.tpl looks like, but keep in mind this is from X-Cart 3.3.x branch and I have taken the liberty of removing our tracking IDs from this code and replaced with "your_tracking_id_here":
Code:
{* $Id: order_message.tpl,v 1.18 2002/10/17 13:54:56 zorg Exp $ *} For overture, I just pasted the code inside some literals. For Google, I'm just doing a loop throught the orders and totaling them with Smarty, then substituting the $grand_total into the Google Javascript code. This way you can track the actual value of each conversion in Google. I just upgraded to this advanced tracking today, so the code isn't tested yet, but it should work fine. |
Placed in the home.tpl would give you incorrect results...
If you place this code in the home.tpl your conversions would be way off, since everything calls that tpl file, you need to place it in the order_message.tpl file, but I have not gotten it to give me any results there, even though I have no javascript errors and it DOES show up in the source on that page, anyone have any ideas?
-Eric Running X-cart 3.5.5 www.chirunning.com |
Are you sure you've got your tracking ID properly substituted? Is it just overture you are having problems with or is it Google? You definitely want the code only in your order_message.tpl. It should not be on any other page.
|
On the note of overture, i noticed that i got a lot of mysql errors for some reason after enabling the advanced tracking on the overture control panel (the admin email contained the string from overture tracking)
|
Still loking for where to place the overture tracking code
I've read many a post and still am not sure where to place the Overture tracking code in the order_message template for 4.0.XX.
Can someone please help? |
You can really place the Overture and Google code anywhere in the order_message.tpl file. Just forget about the <head> tags and just use everything between the <script></script> tags. For example, I have the following code at the very top of my order_message.tpl file with conditional statements so that it is only loaded if we are not in test mode and we are not looking at the printable version. Keep in mind that I'm using the 3.x branch of x-cart, but this should be very similar if not identical to what you would need to do.
Code:
{if $this_is_printable_version eq ""} Then just before the closing {/capture} tag on my template, I put the Google Adwords conversion code, so the bottom of my template looks like this: Code:
Also, if you're using cartlab's Google Analytics mod, you could include that in the section that loops over the order items like so: Code:
{section name=oi loop=$orders} Hope that helps. |
Re: Need help installing Overture Conversion Counter code
Do you know if this would work with X-cart 4.1.x release?
Thanks -Tuan Quote:
|
Re: Need help installing Overture Conversion Counter code
I placed my Google conversion code, enclosed in literal tags - {literal} java code {/literal}, at the bottom of the customer/main/order_message.tpl and it works fine. I'm using version 4.1.5.
|
All times are GMT -8. The time now is 01:07 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.