Inserting the tracking code
To complete this process, you must have access to your website source code and be comfortable editing HTML (or have a webmaster/developer who can help you). The tracking code contains a unique ID that corresponds to your account. Don't mix up tracking code snippets from different accounts.
The tracking code is used by Yusp to collect event data on your site. It is, therefore crucial to include it on:
- all of your product pages
- pages where you plan to place recommender boxes
- on the "Checkout Complete" / "Thank you" page of your shop (if you plan to track buys as well)
To set up the tracking code:
Copy the tracking code from the box including the <script> and </script> tags.
- Find the template file(s) of the page(s) that you want to track and paste the script between the <head> tags.
Unless you really know what you’re doing, we advise you to paste the code snippet into all pages of your website. Here are the template files where you’ll want to paste the tracking code, if you’re using some of the most popular CMSs and eCommerce engines:
- Wordpress (WooCommerce): We have a dedicated Woocommerce plugin, that connects your shop with your Yusp Dashboard and also handles seamless user and product catalog synchronization.
- Prestashop: (v. 220.127.116.11-0, might be different with earlier versions): themes/yourtheme/header.tpl - Note, that Prestashop does not recompile template files by default. If this is the case on your site as well, the Yusp installation guide will not let you proceed to the next step until you do one of the following:
- Delete the content of the following directories in your Prestashop folder...
- ...or go to "Advanced parameters -> Performance -> Smarty" on the Prestashop UI and check "Recompile templates if the files have been updated", for the time of the installation (if it is a production environment, set it back to "Never recompile", after you finish, as recompiling can make your site slower).
- Stay tuned, as we're getting close to releasing our dedicated Prestashop plugin for Yusp.
OpenCart: (v. 18.104.22.168-1, might be different with earlier versions): catalog/view/theme/yourtheme/template/common/header.tpl
- Shopify: If you're installing Yusp on a Shopify shop, please, use our Shopify plugin. For instructions on how to set up Yusp using the Shopify plugin, check out this page, or the plugin description in the Shopify store.
- Drupal 7: sites/all/themes/yourtheme/templates/html.tpl.php