How To

Adding Tracking Parameters to URLs

Often merchants will want to append a tracking parameter to the URLs used by various providers.  This allows them to track which provider has provided traffic to their website.  Adding tracking parameters can be done by creating and applying a Business Rule

 

Using Business Rules to Add Tracking Parameters



There are two basic scenarios that you will have when updating tracking parameters on your outgoing URLS:

  1. Append a tracking parameter to the end of the product URL from your source data.
  2. Replace placeholder text within a URL with the CSE tracking value.


Append a tracking parameter to the end of the product URL from your source data.

In this scenario, your base URL in your incoming data feed will not contain any extra parameters for tracking. A sample URL might look something like this:

EXAMPLE: http://www.myonlineretailstore.com/products/lookup/SKU1234.html

Assuming that this URL text is stored in the ActionURL field of your incoming data feed, the tracking parameter can be added to this URL.  You can add the provider name to the end of the Action URL.  An example for Shopzilla would might look something like this:

EXAMPLE : http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=shopzilla

 

To Create This Business Rule
  • Go to Digital Marketing > Marketing Management > Business Rules and choose  New Business Rule .
  • Enter a name for the Business Rule.   For example, "Tracking Code - Shopzilla".  It's good practice to include the name of the shopping site in the rule so you will know which one to choose from when applying it on the feed template.
  • In the Expression box use the CONCATENATE function to join the base URL and the tracking code together. CONCATENATE uses up to 8 different text strings and/or fields and returns a string with all of those values combined. Here is the sample code to be placed in the Expression field:

    CONCATENATE( $actionurl, "?shoppingcode=shopzilla" )

    NOTE: When referencing any data field, always prepend the name of the field with a single dollar sign.
  • Save and Validate your new rule.   This will check that you have the correct syntax entered.
  • Save and Exit.


Return to Top  

Replace placeholder text within a URL with the CSE tracking value.


In this scenario, your base URL in your incoming data feed will contain a placeholder that will be replaced with the proper code(s). A sample URL might look something like this:

EXAMPLE : http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=XXXX

Assuming that this URL text is stored in the ActionURL field of your incoming data feed, the XXXX in the URL would be replaced with the proper code.  An example for Shopzilla might look something like this::

EXAMPLE : http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=shopzilla

 
To Create This Business Rule
  • Go to  Digital Marketing > Marketing Management > Business Rules  and choose  New Business Rule .
  • Enter a name for the Business Rule.   For example, "Tracking Code - Shopzilla".  It's good practice to include the name of the shopping site in the rule so you will know which one to choose from when applying it on the feed template.
  • In the Expression box use the REPLACE function to replace the XXXX part of the URL with the proper code. REPLACE finds text within a string and replaces all matches with new text. Here is the sample code to be placed in the Expression field:

    REPLACE( $actionurl, "?shoppingcode=XXXX", "?shoppingcode=shopzilla)

     NOTE: When referencing any data field, always prepend the name of the field with a single dollar sign.
  • Save and Validate your new rule.   This will check that you have the correct syntax entered.
  • Save and Exit.

Return to Top  

Applying the Tracking Business Rule on a Feed Template


Once your business rule is created you will want to edit the Feed Template for the provider the rule was made for.  

  • Go to  Digital Marketing > Marketing Management > Feeds. 
  • Select the  Templates tab.
  • Click the Template Name of the feed template for which your business rule was made.   
  • Edit the Template Field with the Product URL.
  • Choose the Business Rule you created to be applied to the Product URL.
NOTE: Each template will have this field in a different position on the template and it may be called a different name. If you have difficulty locating it then try looking for the field that is mapped to actionurl as the default value.
  • Click Save and Exit.

Once you have applied this business rule you can preview the feed to ensure that the URL tracking codes have been added.

Return to Top

Often merchants will want to append a tracking parameter to the URLs used by various providers.  This allows them to track which provider has provided traffic to their website.  Adding tracking parameters can be done by creating and applying a Business Rule

 

Using Business Rules to Add Tracking Parameters



There are two basic scenarios that you will have when updating tracking parameters on your outgoing URLS:

  1. Append a tracking parameter to the end of the product URL from your source data.
  2. Replace placeholder text within a URL with the CSE tracking value.


Append a tracking parameter to the end of the product URL from your source data.

In this scenario, your base URL in your incoming data feed will not contain any extra parameters for tracking. A sample URL might look something like this:

EXAMPLE: http://www.myonlineretailstore.com/products/lookup/SKU1234.html

Assuming that this URL text is stored in the ActionURL field of your incoming data feed, the tracking parameter can be added to this URL.  You can add the provider name to the end of the Action URL.  An example for Shopzilla would might look something like this:

EXAMPLE : http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=shopzilla

 

To Create This Business Rule
  • Go to Digital Marketing > Marketing Management > Business Rules and choose  New Business Rule .
  • Enter a name for the Business Rule.   For example, "Tracking Code - Shopzilla".  It's good practice to include the name of the shopping site in the rule so you will know which one to choose from when applying it on the feed template.
  • In the Expression box use the CONCATENATE function to join the base URL and the tracking code together. CONCATENATE uses up to 8 different text strings and/or fields and returns a string with all of those values combined. Here is the sample code to be placed in the Expression field:

    CONCATENATE( $actionurl, "?shoppingcode=shopzilla" )

    NOTE: When referencing any data field, always prepend the name of the field with a single dollar sign.
  • Save and Validate your new rule.   This will check that you have the correct syntax entered.
  • Save and Exit.


Return to Top  

Replace placeholder text within a URL with the CSE tracking value.


In this scenario, your base URL in your incoming data feed will contain a placeholder that will be replaced with the proper code(s). A sample URL might look something like this:

EXAMPLE : http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=XXXX

Assuming that this URL text is stored in the ActionURL field of your incoming data feed, the XXXX in the URL would be replaced with the proper code.  An example for Shopzilla might look something like this::

EXAMPLE : http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=shopzilla

 
To Create This Business Rule
  • Go to  Digital Marketing > Marketing Management > Business Rules  and choose  New Business Rule .
  • Enter a name for the Business Rule.   For example, "Tracking Code - Shopzilla".  It's good practice to include the name of the shopping site in the rule so you will know which one to choose from when applying it on the feed template.
  • In the Expression box use the REPLACE function to replace the XXXX part of the URL with the proper code. REPLACE finds text within a string and replaces all matches with new text. Here is the sample code to be placed in the Expression field:

    REPLACE( $actionurl, "?shoppingcode=XXXX", "?shoppingcode=shopzilla)

     NOTE: When referencing any data field, always prepend the name of the field with a single dollar sign.
  • Save and Validate your new rule.   This will check that you have the correct syntax entered.
  • Save and Exit.

Return to Top  

Applying the Tracking Business Rule on a Feed Template


Once your business rule is created you will want to edit the Feed Template for the provider the rule was made for.  

  • Go to  Digital Marketing > Marketing Management > Feeds. 
  • Select the  Templates tab.
  • Click the Template Name of the feed template for which your business rule was made.   
  • Edit the Template Field with the Product URL.
  • Choose the Business Rule you created to be applied to the Product URL.
NOTE: Each template will have this field in a different position on the template and it may be called a different name. If you have difficulty locating it then try looking for the field that is mapped to actionurl as the default value.
  • Click Save and Exit.

Once you have applied this business rule you can preview the feed to ensure that the URL tracking codes have been added.

Return to Top

0
Your rating: None Average: 5 (3 votes)
0
Your rating: None Average: 5 (3 votes)

Previous Comments


Great Info!

Very comprehensive and easy to understand for those of us you aren't especially tech savvy.  However, I had to replace the & with a ? to get it to work - for example, instead of - http://www.myonlineretailstore.com/products/lookup/SKU1234.html&shoppingcode=shopzilla - I had to use - http://www.myonlineretailstore.com/products/lookup/SKU1234.html?shoppingcode=shopzilla

Wed, 07/22/2009 - 18:59 - Lisa Purvis

Re: Great Info!

Lisa, thank you for your feedback.  You are correct that the tracking URL would indeed use a ? rather than an &.  I have updated the content above to correct this typo.  Thank you!

Fri, 10/09/2009 - 13:39 - Rachel Miller

Bradley

I had an issue were the tracking was turned on all my feeds, it seems from the back end becuase we didnt add this to any of our urls or made a rule for it. we cant seem to turn it off

Thu, 11/26/2009 - 15:13 - Bradley Robshaw