[EN] Tracking Special scripts and events

Modified on Tue, 21 May 2024 at 07:58 AM

Special scripts and coding


NOTE: The code in examples below sometimes includes an additional space for readability. Remove this space if you copy an example for your own use. If you put code on the website, make sure that the page is being displayed properly and features (such as buttons or forms) function properly. The addition of code elements such as mentioned here, can affect the features on the website.

 

Javascript links

Use these instructions, for example, if you want to analyze visits by visitors who:

  • open Javascript links or images
  • open webpages made with Ajax
  • go to an anchor (#) in an HTML page and you have not selected Anchors=On in the Snoobi basic tracking
  • need to add a variable such as a login name or product code to the tracking

 

These instructions assume that you have installed the Snoobi script.

 

An example of applying an onclick event

Use this feature to track clicks on a document download, if not already done by the standard Snoobi script:

 

snoobi.trackPageView (pathParam)

 

Add the function to the JavaScript event, for example to:

 

  • onClick
  • onmousedown

 

You can include a page name and section as parameters, but that is not generally recommended. Talk to Support for more information.

 

Invalid characters

  • The characters & and = can not be used as a parameter value. Instead, use the URL encoded characters.
  • Spaces and special characters (such as accented letters, Chinese characters, etc.) cannot always be used in page and cluster names. If they are used,  the Snoobi script it is possible that it no longer functions.
    Snoobi uses UTF-8. Contact us if yiu have questions
  •  If you want to divide a single page in more than one cluster, add clusters manually, for example, by making use of the &addurl parameter. A single page in Snoobi can have only one cluster parameter.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article