Overview
Before you can start using Relevic to personalize your website content, you need to install a lightweight JavaScript snippet. This script enables Relevic to connect with your website and deliver personalized experiences 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
Access the Get Started Tab:
The “Get Started” is the very first tab you land on after logging into your Relevic account. Once you have entered your website’s name, you can proceed to step 2: “Install the Relevic Script.”
2. Copy the Embed Code:
As shown in the picture, clicking “Install Relevic Script” will display our lightweight JavaScript. Here, simply copy the script.
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 visitors 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 its installation from within the Get Started tab. 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.