Pre-requisites
It’s worth familiarizing yourself with the guides on authentication and SDKs as they will both be used in the following steps.Front end
Ourvalued.js
library will automatically capture all the pageview events that occur on your application.
1. Add valued.js
To include the valued.js
script in your application, add the snippet below between the <head> ... </head>
section of your page.
api-key
to match the settings on your Integrations page, as well as the customer-id
and user-id
s to match the user using your application, and the customer they belong to.
2. Adjust your Content Security Policy (CSP)
Your website might use a Content Security Policy (CSP) to secure it. In this case, you need to add Valued to your trusted sources of script execution, inconnect-src
:
cdn.valued.app
ingest.valued.app
cdn.valued.app
is the Valued JavaScript library measuring Pageviews, and ingest.valued.app
stores them.