Web Interactions

You can integrate Symplify to track user behavior on your site. The collected information can be used in filters and segments to target the user's content. This is an important distinction from other monitoring tools that you could use: the goal here is not to collect general behavioral data for statistical analysis, but to collect detailed information for each individual user so that you can correctly target the user's content from this information.

The following will guide you through the steps necessary to start following the user's web interaction.

Generate a Web interaction token

A Web interaction token is required to identify your site when sending tracking data to Simplify. You can create a token on Account settings > (Connections) Web Interaction.

Add the script tag

The first step of integration on your site is to include the tracking script. The script must be included on every page where you want to collect tracking information.

You will need two configuration settings specific to your account: your Web interaction token and your Symplify server ID.​

<script
id="carma-tracking"
type="text/javascript"
data-server="[Your Symplify server id]"
data-url="//jp52d3joej.execute-api.eu-west-1.amazonaws.com/prod/t"
data-token="[Your token]" src="//d3mi6d1ao3fzsg.cloudfront.net/carma-scripts/tracking.min.js">
</script>

The script can be configured to generate debug information on the javascript console, which can be useful during the installation phase for troubleshooting:

​​

<script
id="carma-tracking"
type="text/javascript"
data-server="[Your Symplify server id]"
data-url="//jp52d3joej.execute-api.eu-west-1.amazonaws.com/prod/t" data-token="[Your Token]"
data-debug="true" src="//d3mi6d1ao3fzsg.cloudfront.net/tracking.min.js">
</script>​


Identify the user

Before tracking information can be recorded, the user must be identified. For users landing on your site using links configured with Symplify ROI tracking, this operation is automatically handled for you by the script. For all other users, you must explicitly tell the script who is the current user:

<script type="text/javascript"> carma.tracking.identify("some.user@example.com");
</script>

​​

The identity of the user must be identical to the one you use to uniquely identify your users in Symplify. This is often the user's email address, but depending on your Symplify imports, it may be your unique internal user ID.

Behavior monitoring

You are now ready to follow user behavior. The information is tracked action by action. Each follow-up event has an action and (optionally) additional information about the event.

 

Examples

<script type="text/javascript">
carma.tracking.track("browsed-category", {
category: "clothing"
});
</script>

​​

<script type="text/javascript">
carma.tracking.track("visited-page", {
page: "index.html"
});
</script>

​​

The event will be automatically timestamped, which will allow you to target the content based on when actions have taken place, for example. "Target users who have viewed the" clothing "category in the last two weeks."

You can also follow an action without providing details about the event:

<script type="text/javascript">
carma.tracking.track("visited-page");
</script>​​

You can track all the data you want, but note that the data you collect should be useful information for targeting the user's content. This means that it will never be a good idea to collect unique information for each user. For example, the following would not be an appropriate follow-up call:

<script type="text/javascript"> 
carma.tracking.track("visited-page", {
page: "index.html?sessionId=" + currentUser.sessionId
});
</script> 

In the example above, the "page" attribute will be unique for each user, which means that it will be useless to target the user's content. The same thing applies to the following call:

<script type="text/javascript">
carma.tracking.track("purchased-item", {
sku: "abc123",
category: "clothing",
orderId: "someUniqueOrderId"
});
</script>

​Since orderId will be unique for each individual call, it will never be useful for targeting the user's content and must be excluded from the call.

Was this article helpful?
0 out of 0 found this helpful