How To

Premium Webstores Tracking Pixel Installation

  There are two areas within your design where tracking codes may need  to be installed:

  • Design Templates  -  If you need to have tracking installed on the homepage, category pages, and product landing pages then the tracking codes will need to be added to your design templates. It is important to note here that the store platform is fairly flexible in terms of how a designer pieces design templates together. Therefore, the design of your site may include one or many design templates to control the look and feel of the various pages. You should work with your designer to understand how this is put together to ensure that the tracking codes are installed properly on all the required pages.
  • Order Confirmation Pages  -  For order tracking, the code can be installed directly on the XML Package called page.orderconfirmation.xml.config. If custom changes are already in place on your site then this file will be located on the FTP site under the directory /skins/skin_N/XMLPackages, where N is the ID of the active skin on your site. You will want to check for the custom file there first. If that file is not in that directory then the default file is located on the store FTP under /XMLPackages. 
Please refer to the  Creating and Storing Custom Design Files  page for further details on how to work with customizing design elements.

 

 

Prerequisites


 

Tasks to Complete


Complete the following tasks related to this topic:


Obtain Tracking Code

To start the install process, you will need to obtain the tracking code from the vendor that you want to track on your store. This will usually consist of the following:
  1. Code snippets / examples that shows exactly what the code is that needs to be added to your site.
  2. Documentation referring to what pages their code needs to placed on.
  3. Documentation that shows what account specific information needs to be in the tracking when it appears on the various pages.

 View the Tracking Code Examples page to view a list of code examples that a designer can use as guidelines.

 

Adding Code to Design Templates

Adding code to design templates is fairly straightforward as the code that makes up the templates will always be in a .ascx file and is made up of ASP code. In general, a designer should be able to place the code directly in this file and have it render on the various pages that the template is setup to control. The designer may have to place the code in a specific area in the template if the requirement is to have the tracking always fire in a particular section of the page. For example, many tracking codes need to be placed within the <HEAD> tags for a given page. Therefore, the code will need to be placed within that tag in the design template.

  It is always best to edit design templates in a simple text editor such as Notepad and never in a word processing program such as MS Word. For further details on how to work with designe templates, please refer to the Skinning Tutorial in the ASP Manual .
 

Adding Code to the Order Confirmation Page

The XML Package called page.orderconfirmation.xml.config is where tracking codes can be added so they render on the final checkout page of your store. For details on how to work with XML Packages, please refer to the  XmlPackage Overview & Operation tutorial.

 

Retrieving Full Item Details

Some tracking pixels only require the order number and total amount which is already available by default in the XML package. However, many tracking pixels require the items in the order which are not available by default. To retrieve this information, a design can add the query below to the page.orderconfirmation.xml.config XML Package. This query should not replace the existing query. This code  must appear before the <PackageTransform> tag. If this is added in the incorrect place then the order confirmation page may fail to load entirely:


<query name="OrderItems" rowElementName="Item">
		<sql>
		  <![CDATA[
			SELECT
			s.OrderedProductSKU AS sku,
			s.OrderedProductName AS name,
			s.OrderedProductPrice AS price,
			s.OrderedProductRegularPrice AS regularunitprice,
			s.OrderedProductSalePrice as saleunitprice,
			s.Quantity AS quantity,
			s.OrderedProductManufacturerPartNumber as ManufacturerPartNumber,
			m.[Name] as ManufacturerName
			FROM dbo.Orders_ShoppingCart s WITH (NOLOCK)
			LEFT JOIN ProductManufacturer pm WITH (NOLOCK) on pm.ProductID = s.ProductID
			LEFT JOIN Manufacturer m WITH (NOLOCK) on pm.ManufacturerID = m.ManufacturerID
			WHERE s.ordernumber = @OrderNumber;
		  ]]>
		</sql>
	<queryparam paramname="@OrderNumber" paramtype="runtime" requestparamname="OrderNumber" 
defvalue="0" sqlDataType="int" validationpattern=""/>
</query>

 

Adding Tracking Codes

The specific pixel code goes at the end of the  PackageTransform  node near the end of the file. Specifically, the code should go just before the closing template tag in the file which looks like </xsl:template>. Here is an example:

Custom channel tracking pixel code goes here

        </xsl:template>

     </xsl:stylesheet>

</PackageTransform>

 

Install ChannelAdvisor Tracking Pixels


If you are running comparison shopping and/or search campaigns in Premium Webstores, then you will want to make sure that you install your ChannelAdvisor tracking pixels on your new store. You should install both the Natural Search and the Order Confirmation pixels in your store. These pixels need to be placed in specific areas of your store to function properly. 

For the full pixel specification please see  Tracking Pixel Specification

Note : You will want to make sure that you keep your SMCID the same when you install the pixel. You can obtain your SMCID within your ChannelAdvisor account by navigating to My Account > Account Settings > Tracking Pixel .

  • ChannelAdvisor Natural Search Pixel The Natural Search Pixel needs to be placed within the various design templates of your site.  The pixel needs to be placed within the header of all the pages you edit. It needs to be placed between these tags  <head> </head>. 

    The Natural Search Pixel should look like the following. Replace the red highlighted  SMCID_HERE  code with your SMCID:
<script language="JavaScript"><!--
{
document.write
("<img src=https://tracking.searchmarketing.com/welcome.asp?SMCID=SMCID_HERE&x="+escape(document.referrer)
+" width=1 height=1>");
}
//-->
</script>                   
                

 











  • ChannelAdvisor Order Confirmation Pixel - The Order Confirmation Pixel needs to be placed within the  page.orderconfirmation.xml.config  In the XmlPackages folder. The pixel code goes at the end of the  PackageTransform  node near the end of the file, just before the closing  </xsl:template>  tag. 

    The Order Confirmation Pixel should look like the following. Replace the red highlighted  SMCID_HERE  code with your SMCID:
<img border="0" alt="" width="1" height="1" >
<xsl:attribute name="src">
https://tracking.searchmarketing.com/thankyou.asp?SMCID=SMCID_HERE&amp;
oVal=<xsl:value-of select="/root/Orders/Order/OrderSubtotal"/>&amp;
OrderID=<xsl:value-of select="/root/Runtime/OrderNumber"/>&amp;
ProductID=<xsl:for-each select="/root/OrderItems/Item"><xsl:value-of select="sku" />,
</xsl:for-each ></xsl:attribute>
</img>       




 

 

 

 

Reference


 

  There are two areas within your design where tracking codes may need  to be installed:

  • Design Templates  -  If you need to have tracking installed on the homepage, category pages, and product landing pages then the tracking codes will need to be added to your design templates. It is important to note here that the store platform is fairly flexible in terms of how a designer pieces design templates together. Therefore, the design of your site may include one or many design templates to control the look and feel of the various pages. You should work with your designer to understand how this is put together to ensure that the tracking codes are installed properly on all the required pages.
  • Order Confirmation Pages  -  For order tracking, the code can be installed directly on the XML Package called page.orderconfirmation.xml.config. If custom changes are already in place on your site then this file will be located on the FTP site under the directory /skins/skin_N/XMLPackages, where N is the ID of the active skin on your site. You will want to check for the custom file there first. If that file is not in that directory then the default file is located on the store FTP under /XMLPackages. 
Please refer to the  Creating and Storing Custom Design Files  page for further details on how to work with customizing design elements.

 

 

Prerequisites


 

Tasks to Complete


Complete the following tasks related to this topic:


Obtain Tracking Code

To start the install process, you will need to obtain the tracking code from the vendor that you want to track on your store. This will usually consist of the following:
  1. Code snippets / examples that shows exactly what the code is that needs to be added to your site.
  2. Documentation referring to what pages their code needs to placed on.
  3. Documentation that shows what account specific information needs to be in the tracking when it appears on the various pages.

 View the Tracking Code Examples page to view a list of code examples that a designer can use as guidelines.

 

Adding Code to Design Templates

Adding code to design templates is fairly straightforward as the code that makes up the templates will always be in a .ascx file and is made up of ASP code. In general, a designer should be able to place the code directly in this file and have it render on the various pages that the template is setup to control. The designer may have to place the code in a specific area in the template if the requirement is to have the tracking always fire in a particular section of the page. For example, many tracking codes need to be placed within the <HEAD> tags for a given page. Therefore, the code will need to be placed within that tag in the design template.

  It is always best to edit design templates in a simple text editor such as Notepad and never in a word processing program such as MS Word. For further details on how to work with designe templates, please refer to the Skinning Tutorial in the ASP Manual .
 

Adding Code to the Order Confirmation Page

The XML Package called page.orderconfirmation.xml.config is where tracking codes can be added so they render on the final checkout page of your store. For details on how to work with XML Packages, please refer to the  XmlPackage Overview & Operation tutorial.

 

Retrieving Full Item Details

Some tracking pixels only require the order number and total amount which is already available by default in the XML package. However, many tracking pixels require the items in the order which are not available by default. To retrieve this information, a design can add the query below to the page.orderconfirmation.xml.config XML Package. This query should not replace the existing query. This code  must appear before the <PackageTransform> tag. If this is added in the incorrect place then the order confirmation page may fail to load entirely:


<query name="OrderItems" rowElementName="Item">
		<sql>
		  <![CDATA[
			SELECT
			s.OrderedProductSKU AS sku,
			s.OrderedProductName AS name,
			s.OrderedProductPrice AS price,
			s.OrderedProductRegularPrice AS regularunitprice,
			s.OrderedProductSalePrice as saleunitprice,
			s.Quantity AS quantity,
			s.OrderedProductManufacturerPartNumber as ManufacturerPartNumber,
			m.[Name] as ManufacturerName
			FROM dbo.Orders_ShoppingCart s WITH (NOLOCK)
			LEFT JOIN ProductManufacturer pm WITH (NOLOCK) on pm.ProductID = s.ProductID
			LEFT JOIN Manufacturer m WITH (NOLOCK) on pm.ManufacturerID = m.ManufacturerID
			WHERE s.ordernumber = @OrderNumber;
		  ]]>
		</sql>
	<queryparam paramname="@OrderNumber" paramtype="runtime" requestparamname="OrderNumber" 
defvalue="0" sqlDataType="int" validationpattern=""/>
</query>

 

Adding Tracking Codes

The specific pixel code goes at the end of the  PackageTransform  node near the end of the file. Specifically, the code should go just before the closing template tag in the file which looks like </xsl:template>. Here is an example:

Custom channel tracking pixel code goes here

        </xsl:template>

     </xsl:stylesheet>

</PackageTransform>

 

Install ChannelAdvisor Tracking Pixels


If you are running comparison shopping and/or search campaigns in Premium Webstores, then you will want to make sure that you install your ChannelAdvisor tracking pixels on your new store. You should install both the Natural Search and the Order Confirmation pixels in your store. These pixels need to be placed in specific areas of your store to function properly. 

For the full pixel specification please see  Tracking Pixel Specification

Note : You will want to make sure that you keep your SMCID the same when you install the pixel. You can obtain your SMCID within your ChannelAdvisor account by navigating to My Account > Account Settings > Tracking Pixel .

  • ChannelAdvisor Natural Search Pixel The Natural Search Pixel needs to be placed within the various design templates of your site.  The pixel needs to be placed within the header of all the pages you edit. It needs to be placed between these tags  <head> </head>. 

    The Natural Search Pixel should look like the following. Replace the red highlighted  SMCID_HERE  code with your SMCID:
<script language="JavaScript"><!--
{
document.write
("<img src=https://tracking.searchmarketing.com/welcome.asp?SMCID=SMCID_HERE&x="+escape(document.referrer)
+" width=1 height=1>");
}
//-->
</script>                   
                

 











  • ChannelAdvisor Order Confirmation Pixel - The Order Confirmation Pixel needs to be placed within the  page.orderconfirmation.xml.config  In the XmlPackages folder. The pixel code goes at the end of the  PackageTransform  node near the end of the file, just before the closing  </xsl:template>  tag. 

    The Order Confirmation Pixel should look like the following. Replace the red highlighted  SMCID_HERE  code with your SMCID:
<img border="0" alt="" width="1" height="1" >
<xsl:attribute name="src">
https://tracking.searchmarketing.com/thankyou.asp?SMCID=SMCID_HERE&amp;
oVal=<xsl:value-of select="/root/Orders/Order/OrderSubtotal"/>&amp;
OrderID=<xsl:value-of select="/root/Runtime/OrderNumber"/>&amp;
ProductID=<xsl:for-each select="/root/OrderItems/Item"><xsl:value-of select="sku" />,
</xsl:for-each ></xsl:attribute>
</img>       




 

 

 

 

Reference


 

0
Your rating: None
0
Your rating: None