SiteSpect integrates with various third-party audience and data management platforms to launch more personalized experiments and to allow you to use externally defined audiences or segments in data analysis. In addition, SiteSpect also allows you to push SiteSpect data to these platforms to improve their visitor profiles and help them discover SiteSpect audiences.
The steps described here tell you how to integrate SiteSpect with Tealium AudienceStream. These instructions are intended for a user who has some experience with AudienceStream and who has sufficient permissions to implement code changes on your website.
The instructions are meant to provide a high-level framework through which you can design your own integration strategy.
Overview
Tealium AudienceStream is a customer data platform with powerful audience management and data enrichment capabilities. It provides unified custom profiles for personalization. Integrating AudienceStream with SiteSpect allows you to use audiences created in AudienceStream to build targeted or personalized experiments in SiteSpect and to analyze data in SiteSpect reports using its external segments.
Through personalization, your website learns what your visitors like and don’t like based on how often they view certain categories of products or content. For example, SiteSpect can leverage AudienceStream data to lookup a visitor’s favorite category and change the experience as part of a personalization Campaign. In this way, a SiteSpect Campaign can promote a visitor’s favorite category to the top of the category listing page in order to see how this promotion affects business KPIs.
In addition, SiteSpect can pull AudienceStream data on the visitor’s favorite category and store it as a Custom Variable and use that for data segmentation. As such, you can show that the promotion of only certain favorite categories has a positive result.
Although you can use SiteSpect to implement AudienceStream on a website, this document assumes that you’ve already set it up and that AudienceStream data is accessible from localStorage where the visitor’s favorite category is stored.
Using AudienceStream Data in a SiteSpect Campaign
SiteSpect’s regular expression engine allows you to not only replace the source code of the page but also to inject JavaScript code to deliver a changed experience. JavaScript code has access to the browser’s localStorage where it can retrieve visitor data from AudienceStream.
To integrate SiteSpect and Tealium AudienceStream, you’ll need to take these steps. Each of these is described in more detail in later sections of this document:
- Set up Tealium AudienceStream to store the visitor’s favorite category in localStorage. Check the AudienceStream documentation for further instruction.
- Set up a Custom Variable in SiteSpect to store the visitor’s favorite category.
- Build a SiteSpect Campaign to inject JavaScript code onto the page. That code uses EventTrack to store the visitor's favorite category, if there is one, in the Custom Variable. If there is a favorite category, the Campaign moves that category to the top of the page.
- Use Reports to Check Your Results
Setting Up a Custom Variable in SiteSpect
The SiteSpect Custom Variable stores the visitor’s favorite category.
- Select New, Custom Variable. The Create New Metric page opens.
- Name the Metric, for example, Top Category.
- In the When to Measure (Triggers) area, select EventTrack from the drop-down and enter category in the Parameter value field.
- Select the check box Capture value for this EventTrack.
- Click Edit EventTrack Triggers to expand the Triggers area. Notice that SiteSpect autofills the following fields:
- URL
- Parameter
- Capture From
- In the Capture a Custom Value area, select Custom Variable as the Value Type.
- Scope is set to Visit Level by default, so leave this as is.
- When you are done creating the Custom Variable, the page looks similar to image below.
- Finally, in the Settings area of the page, select Use this Metric for Personalization so that you can use this Metric for advanced targeting.
The Metric is now setup to store the visitor’s favorite category in SiteSpect when the EventTrack call fires. For example, the JavaScript code injected by the Campaign may find that a visitor’s favorite category is shoes. As such, the EventTrack call sends an Ajax request with the URL https://www.example.com/__ssobj/track?event=category&value=shoes which matches the regex logic specified in the Triggers area and the Capture From field.
Building a SiteSpect Campaign
Build a SiteSpect Campaign to capture the visitor’s favorite category in a Custom Variable and to promote that category to the top of the category listing page. In addition, you can use that Custom Variable for segmentation (Segments in SiteSpect reports) and personalization (Targeting Campaigns).
To execute JavaScript code on the page, the SiteSpect find and replace Campaign finds an HTML tag and replaces it with the same HTML tag and in addition adds a new <script> tag, which contains JavaScript code. This JavaScript code looks into localStorage to find the visitor’s favorite category and then:
- Uses EventTrack to send the favorite category to SiteSpect, which SiteSpect stores in the Custom Variable.
- Tracks a string value of the category with EventTrack. The EventTrack library (core.js) must be on the page. The code should look similar to this: SS.EventTrack.rp("category",”shoes”), which makes the following Ajax request to SiteSpect: https://www.example.com/__ssobj/track?event=category&value=shoes.
- Moves the favorite category to the top of the page.
To build the find and replace Campaign:
- Select New, A/B Campaign.
- Complete the General section and select Standard from the Type drop-down.
- In the Variations section of the page, rename Variation Group 1 to Favorite Category.
- For Variation 1, select URL from the Type drop-down and enter /category/ in the Contains field.
- In the Find This field, enter </body>.
- In the Replace With This field you’ll enter something like the following example and replace the JavaScript comment with your own code:
<script>
//JavaScript code to look for Tealium data in localStorage, promote visitor’s favorite category, and track the data in SiteSpect.
</script>
</body>
- Finish by selecting Metrics you want to track and any Audiences you want to target.
- Click Save at the bottom of the page.
Use Reports to Check Results
Use SiteSpect reports to see if promoting the favorite category increases KPIs. For deeper analysis, create a Segment that matches on any category stored in the Custom Variable to try to figure out if certain categories result in better lift to key KPIs.
To create a Segment to use in your reports:
- Select New, Report Segment.
- Give the Segment a name and complete the basic fields at the top of the page.
- Select Custom Variables from the Segment Filters drop-down. Then choose the name of the Custom Variable that you created above (Top Category or your name).
- Select Contains and then enter the category you want to Segment on. The example below shows shoes as the Category.
- Save the Segment and then use it in SiteSpect reports to learn the effects of promoting that specific Category.
Creating Audiences for Targeting and Personalization
To create an Audience for targeting and personalization:
- Select New, Audience.
- Click Create at the right end of the row for Custom Variable.
- Select the Custom Variable and enter a category name for the value, for example shoes, so that you can target visitors whose favorite category is shoes.
- Include this Audience in a Campaign to target that group.