Overview
Before you can start using Relevic to personalize your website content, you need to install the Relevic JavaScript personalization script. This script is essential for enabling personalized content delivery based on visitor behavior, location, and other targeting criteria. In this guide, we’ll show you how to insert the script into your website’s header.
Why Is the Script Important?
The Relevic personalization script tracks user behavior (e.g., page views, clicks) and ensures that the correct personalized content is displayed to the correct audience segment. Without this script, Relevic cannot detect users’ interactions with your site, and your personalization campaigns won’t be able to trigger the right content.
Steps to Insert the Relevic Personalization Script:
1. Access the Relevic Configuration Tab:
Log into your Relevic account and navigate to the Configuration tab, located in the left-hand menu. This is where you’ll find the JavaScript code that needs to be embedded on your website.
2. Copy the Embed Code:
Once in the Configuration tab, click the “Copy” button to copy the JavaScript code snippet to your clipboard. This code must be placed in the header section of your website.
3. Insert the Script into Your Website’s Header:
If you’re using a website builder like WordPress, Webflow, or Wix, follow these steps:
WordPress: Go to your WordPress dashboard, click on Appearance > Theme Editor (or use a header/footer plugin), and paste the script right before the closing
</head>
tag.Webflow: Open the project settings, click on Custom Code, and paste the script in the header section of your site.
Wix: Access the Tracking & Analytics section in your site's settings, and paste the script into the header code.
If you’re using a custom-built website, forward the script to your web developer and ask them to insert it into the header section of your website’s HTML.
4. Enable Cookie-Based Personalization:
To take full advantage of Relevic’s features, enable cookies on your site. This allows Relevic to track user behavior over time, such as repeat visits to a product page. Ensure your consent management tool (if applicable) is configured to work with Relevic for compliance with privacy regulations (e.g., GDPR).
Pro Tip: Use cookies to show returning visitors personalized content based on their previous interactions. For example, offer a discount to users who have visited your pricing page three times but haven’t yet signed up.
5. Verify Installation:
After inserting the script, refresh your website and verify that it’s working by checking the Relevic dashboard. If the script is correctly installed, Relevic will start tracking user behavior, and your personalization campaigns will be ready to trigger.
6. Troubleshooting:
If the script isn’t working as expected, double-check that it’s been placed in the correct section of the header. Ensure no additional scripts are interfering with its functionality. You can also use your browser’s developer tools to inspect your site and confirm the script is active.
Example: Let’s say you run a B2B SaaS company and want to personalize your homepage based on whether a visitor comes from Google Ads or an email campaign. After installing the Relevic script, you can set up campaigns that show targeted messaging based on UTM parameters for each traffic source.