Skip to main content
Built-in events
Jessica Chambers avatar
Written by Jessica Chambers
Updated over 2 months ago

Built-in events

Silktide Analytics has many built-in events which will automatically record for you out-of-the-box:

  • A page_load event when the page first loads.

  • A page_update event when the page is unloaded, or enough time has passed

  • A click event when the user clicks or taps on something.

  • A frustration event when the user clicks on an element that doesn’t either a) change the content of the current page or b) load a new page.

  • A download event when the user downloads a file, detected automatically as clicking on a link which ends in a known file extension, for example "PDF"

In most cases these will just work, but you might want to record one of these events manually if your website does something that Silktide would not automatically detect, for example if your download links don’t use detectable file extensions.

You can also record your own custom events to measure things that are of interest to you, such as visitors who complete a form or who add a product to a basket.

page_load event

Fired automatically when a page is loaded. There should be no need for you to call this, unless you're doing client-side rendering.

Example:

silktide("page_load");

page_update event

Fired automatically when the page is unloaded. There should be no need for you to call this unless you're doing client-side rendering.

Example:

silktide("page_update", { "duration": 2.33, "maxScroll": 45.1});
  • duration – the total time spent actively looking at the page. This does not increment if the user is not looking at the page (e.g. is in a different tab) or if the user is inactive for a while.

  • maxScroll – the maximum % of the vertical height of the page we viewed (e.g. if we scrolled to the bottom, this would be 100%)

click event

Fired automatically when the user clicks on part of the page, regardless of whether that click does anything. There should be no need for you to call this.

Example:

silktide("click", { "selector": ".foo a", "url": "<https://silktide.com/contact-us>", "x": 10, "y": 20 });
  • selector – the lowest selector below the click

  • x and y – the % position of the click within the selector (e.g. x = 50, y = 50 would mean ‘in the exact middle’.

  • url – if the target of the click is a new URL (e.g. a <a href="...">) then we log the URL here. We only do this for links.

frustration event

download event

Did this answer your question?