With the Sitefinity Insight JavaScript SDK, you can easily track client-side interactions of your website visitors. You can also use the SDK to:
To create and initialize a new instance of Sitefinity Insight SDK client, in the HTML of your page perform the following:
In the <head> tag of your page, add a <script> tag containing the code to create an instance of the Insight SDK client using the following sample:
<head>
<script>
Optionally, you can provide a settings object that can contain the following properties:
settings
apiKey
source
RECOMMENDATION: We recommend using a single data source for all data within a data center in most cases.
For more information, see Data sources.
authToken
apiServerUrl
trackingCookieDomain
autoTracking
instrument
trackPageVisits
trackBrowserInformation
true
subject
enableTracking
By default, the value of the property is set to true. If you disable this property, no requests are made to the Sitefinity Insight API and no tracking and personalization are executed by the SDK. In accordance with GDPR, the visitor provides consent to be tracked or rejects to be tracked. You set the property value to true or false, accordingly.
false
For more information, see Manage cookies » GDPR compliance.
NOTE: You can use this parameter only if you are working with JavaScript SDK version 3.0 and newer.
cookieMaxAgeInDays
Default value: 365 (one year). This property specifies the number of days until the tracking cookie expires.
365
NOTE: You can use this parameter only if you are working with JavaScript SDK version 3.1.2 and newer.
cookieSlidingExpiration
Default value: false. If enabled, cookie expiration resets every time a front-end page is visited. Unless you set the cookie expiration in the maxAgeForTrackingCookieInDays property, the default value of 365 is used.
maxAgeForTrackingCookieInDays
crossDomainTrackingEntries
List of domain names of sites for which cross-domain tracking of visitors is performed.
That is, a single physical user is tracked across all these domains and their visitor journeys are merged into one. For more information, see Track interactions across multiple domains.
sessionLengthInMinutes
trackYouTubeVideos
trackVimeoVideos
useSecureCookies
SameSite=Lax
After you have registered the callback, download and execute the Insight SDK.
To do this, in the <head> tag, add the following <script> tag:
RECOMMENDATION: We recommend using the sample above to use the minified Insight SDK distribution in production.
However, you can choose to use a development build of the SDK. The following table contains the current versions of the SDK with the respective CDN links:
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important