View Single Post
  #1  
Old 03-17-2004, 10:28 PM
  enge919's Avatar 
enge919 enge919 is offline
 

Senior Member
  
Join Date: May 2003
Posts: 141
 

Default 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"> <!-- Overture Services Inc. 07/15/2003 var cc_tagVersion = "1.0"; var cc_accountID = "xxxxxxxxxx"; var cc_marketID = "0"; var cc_protocol="http"; var cc_subdomain = "convctr"; if(location.protocol == "https:") { cc_protocol="https"; cc_subdomain="convctrs"; } var cc_queryStr = "?" + "ver=" + cc_tagVersion + "&aID=" + cc_accountID + "&mkt=" + cc_marketID +"&ref=" + escape(document.referrer); var cc_imageUrl = cc_protocol + "://" + cc_subdomain + ".overture.com/images/cc/cc.gif" + cc_queryStr; var cc_imageObject = new Image(); cc_imageObject.src = cc_imageUrl; // --> </SCRIPT>

And the instructions they sent:
Code:
The tag must be placed on the transaction completion page of your Website. The tag must not be modified. Modification of the Overture tag will result in malfunction of the tag, including data loss or inaccurate collection of data. WHERE TO INSERT YOUR TAG To properly track a conversion, OvertureБ─≥s tagging technology must be placed on the transaction completion page. If the tag is placed on any other page, your conversion counts could be overstated. The Overture tag must be placed within the header of the HTML document between the <HEAD> (open header) and </HEAD> (close header) tags. Example of a basic HTML document using recommended tagging method <html> <head> <title>Sample HTML File</title> <SCRIPT LANGUAGE="JavaScript"> <!-- Overture Services Inc. 03/01/2003 var ov_tagVersion = "1.0.0"; var ov_accountID = "XXXX"; var ov_queryStr = "?" + "tv=" + ov_tagVersion + "&ai=" + ov_accountID + "&rf=" + escape(document.referrer); var ov_convImage = new Image(); ov_convImage.src = "//oa.overture.com/Conversion.gif" + ov_queryStr; // --> </SCRIPT> </head> <body> This is the content of your web page. </body> </html> HYPERTEXT PREPROCESSOR (PHP) SET UP INSTRUCTIONS OVERVIEW This section describes how to use PHP to get the tag written into your confirmation or thank you page. You will need to save the JavaScript code provided at signup time (or retrieved from DTC) to a file on your webserver and then include a small amount of PHP script in the HEAD section of your html. INSTRUCTIONS Step 1 Save the JavaScript provided to you as a file, in this example Б─°overture_cc.jsБ─² Step 2 Place this file on your webserver, in a location of your choice, for example Б─°/javascript/overture_cc.jsБ─² Step 3 Edit your confirmation or thank you page to include the following PHP script <?PHP $filename = Б─°javascript/overture_cc.jsБ─²; $fp = fopen($filename,Б─≥rБ─≥); if ($fp) { $js = fread($fp,filesize($filename)); echo($js); fclose($fp); } <?> Important The value supplied to the filename variable in the script shown above is dependent on threeitems: 1) what you named the JavaScript file supplied to you by Overture 2) where you place the JavaScript file supplied to you by Overture 3) The location of the JavaScript file relative to the location of your confirmation or thank you page template. As shown in the above example, there is a directory or folder named Б─°javascriptБ─² that is in the same directory as the confirmation or thank you page, and inside that folder there is a file named overture_cc.js. Please consult your webmaster if you are not sure of how to implement this approach.



Any help with this is much appreciated!

The site this is going on is x-cart 3.4.11
__________________
Web site design - Custom Programming - Upgrades - Marketing
www.netvisionwebdesign.com

Follow on twitter: http://twitter.com/netvisionweb
Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419
Reply With Quote