Tracking data from external websites
With jExperience, you can collect data from websites, portals, or applications that are not created using Jahia CMS. For example, if you’ve created sites using WordPress, Drupal, or a custom application, you can still use jExperience to collect data.
To collect data you:
- Enable the External Site option for your site
- Copy the tracking code snippet from jExperience and add it to your external site
These prerequisites are not required when using a free trial version of Jahia.
Security and GraphQL API
Before you configure Jahia to collect data, your developer must ensure that the Jahia GraphQL API is available to the domain you are using. More information can be found in the authentication and authroization section in Using GraphQL to perform queries.
We recommend that you keep internal and external websites separate and create a dedicated project (from Jahia>Administration) corresponding to your external website.
Enabling the External Site option
After creating your project, enable the External Site option for your site.
To enable the option:
- In Page Composer, navigate to the top-level site node for your site.
- Right-click and select Edit from the shortcut menu.
- In Content, scroll down and enable jExperience - External Site, as shown in the following example.
- Click Save.
Copying the tracking code snippet to your external site
By default, the tracker collects the following data:
- URL of the page
- Page title
- In jExperience, navigate to Projects>Tracking information.
- If necessary, refresh the page.
- In Tracking Information, click Copy tracking code.
- Next, copy the tracking code to your external site. Add the snippet to the <head> tag in your web page using your CMS or Google Tag Manager.
- To verify that tracking works correctly, in jExperience navigate to Projects>Metrics>Most visited pages. You should see data indicating that you have page views.