Search the Omeda Knowledge Base
Implementing Omeda’s CDP Solution, Olytics
- Global CSS
- olytics.fire script
Let’s break down what each of these do in more detail.
The Olytics CSS will primarily provide the styling required to use Personalization, Meters, and our Consent Management solution on your sites. NOTE: The source url for the stylesheet will be different for the Staging and Production environments.
This script will create two cookies, the oly_anon_id cookie and the oly_enc_id cookie, and store them in the user’s browser for your site domain.
The oly_anon_id cookie will always be populated in the browser if the olytics.load script is implemented correctly, and will be the id associated with all of a user’s visits to your domain. The value for this cookie is also referred to as the Anonymous Id or the Alternate Id.
The oly_enc_id cookie will be populated for your site users if they have converted to a known customer. This id is their encrypted customer id. If they have not yet converted their traffic to a known customer record, this value will be null.
Let’s explore a few user personas and how these id’s will or will not be populated in their browser:
- A new site user
- When this user visits your Olytics site for the first time a new, unique anonymous id will be created for them and will be stored in the oly_anon_id cookie. This customer will be created in your database as an anonymous customer. You can find this customer in your database by pasting this value in the Alternate Id field in Audience Search. The oly_enc_id cookie will be created but the value will be null.
- A returning anonymous user
- When this user returns to your Olytics site, if the oly_anon_id is still stored in their browser, the new visit will be associated to their anonymous customer record.
- This user’s anonymous customer id will now be attached to a known customer record which will associate all visits to your site made with the oly_anon_id to the known record in your database. The oly_enc_id cookie value will now be populated.
- A known user
- This user’s oly_enc_id and oly_anon_id cookie values are stored in their browser and all visits to your Olytics site will be associated to their known customer record.
This script will associate the visitor created by the olytics.load script with an Olytics behavior stored in your database. These Olytics behaviors are typically for a single site domain and have a unique behavior id which should be populated in the olytics.fire script. This script is how we determine which Olytics domain your user has visited and when. The behavior can then be used to query on these properties in Audience Builder. Within this script is where you will also pass Omeda attributes about the particular url they have visited like Category or Tag. Custom Olytics attributes can also be used to pass us details about the visit. To create a custom Olytics attribute please create a ticket in the Jira Service Desk.
An example of this script with each Olytics behavior id and the Olytics attributes for your database can be found under Integrations and Olytics within the Omeda portal.
You can choose to populate the Olytics attributes within the olytics.fire script in a couple of ways. You may choose to populate the attributes by manually adding the Category and Tag for each page, or you can choose to populate these values from the metadata of your page.
Adding the Scripts to Your Sites
The instructions below outline how these scripts might be added using Google Tag Manager or WordPress.
Adding Olytics to Your WordPress Sites
- Go to Settings
- Select Per Page Add to Head
- Paste in your Olytics script
Adding Olytics to you Sites using Google Tag Manager
In Google Tag Manager, navigate to the container associated to the domain you want to add Olytics to. This step will be repeated for every domain.
- Select the site domain container
- Select Tag, then select New in the upper right corner.
- Click on Tag Configuration and select Custom HTML
- Paste in your Olytics script
- Click on Trigger and add trigger by choosing the + button on the upper right. You can select All Pages (default) or create a custom trigger if you only want to trigger Olytics to fire on certain pages.
Using Metadata to Populate Your Olytics Attributes
Rather than managing the Olytics attributes for each page, you may choose to leverage the existing metadata on your sites to populate the Olytics attributes. To do so, you’ll need observe how your metadata is stored and which values should be passed each Olytics attribute.
Adding Category and Tag values your post using WordPress.
- Go to any of your post or articles
- At the bottom of your post, there is a section called “Add to head”.
- Insert meta names olyticsCategory and olyticsTag (see below) to the head of your post or article.
- Add values e.g. (blog, post, widgets, marketing etc.)
Important note – you will need to use a comma between values if there is more than one value you want to record for each meta name.
<meta name=”olyticsCategory” content=”Insert a value here” />
<meta name=”olyticsTag” content=”insert in a value here” />
*Important Note: 1. Search for INSERT YOUR OID KEY and replace with your OID Key. Also known as Olytics Connection Key. 2. Search for encrypted-behavior-id and replace with the behaviorId related to your site. If you do not know them, please reach out to Client Success.
Custom Olytics Script: