How do I track clicks on my website?

Last Updated: 11/6/2024     Tags: web, track, tracking, click, clicks
  • Switch Version
  • V5
  • V4

Web tracking allows you to track websites visited through the use of the Taguchi web tracking script. The script just needs to be included on all pages in your website and a few extra optional parameters to add further information (such as product information, SKU's and product category if a subscriber views a product page on your website).

Page Tracking

The following code can be used to log page visits in the Taguchi interface and reporting system, without needing any further configuration. However, this code does not allow additional data to be saved with the tracked page visit. This script is ideal for use on all pages of your website (apart from product pages, see product page tracking for further information).

<!-- TM web tracking code -->
<script type="text/javascript">
<!--
(function(c) {
try { var i = new Image(); i.src = "https://<client>.taguchimail.com/wi/wa/" +
encodeURIComponent(JSON.stringify(c)) + ".gif"; } catch (err) { }
})({
    /* Taguchi web page data */
    pageUri: window.location.href
});
//-->
</script>
<noscript><img src="https://<client>.taguchimail.com/wi/wa/ns.gif" height="0" width="0" /></noscript>

Note that <client> must be replaced with your click-tracking domain; contact Taguchi support if you do not know what this is.

Product Page Tracking

This code allows custom data to be tracked with each page visit, including product SKU's, category, and other information. It is important to populate these variables with applicable product information. This script is ideal for product pages where one product is present.

<!-- TM web tracking code -->
<script type="text/javascript">
<!--
(function(c) {
try { var i = new Image(); i.src = "https://<client>.taguchimail.com/wi/wa/" +
encodeURIComponent(JSON.stringify(c)) + ".gif"; } catch (err) { }
})({
    /* Taguchi web page data */
    pageUri: window.location.href,
    /* Custom page view fields go here: arbitrary keys/values to be used for targeting */
    productName: "example product name",
    productSku: "example product SKU",
    productCategory: "example product category"
});
//-->
</script>
<noscript><img src="https://<client>.taguchimail.com/wi/wa/ns.gif" height="0" width="0" /></noscript>

Note that <client> must be replaced with your click-tracking domain; contact Taguchi Support if you do not know what this is.