Easier implementations: contextData

A comprehensive repository of Taiwan's data and information.
Post Reply
Jahangir147
Posts: 96
Joined: Tue Jan 07, 2025 6:38 am

Easier implementations: contextData

Post by Jahangir147 »

As a company that helps to roll out SiteCatalayst on a regular basis, we’ve found that there are a few steps that regularly hold up implementations. One of these, and probably the biggest time-devourer, is the addition of any on-page code within a site.

By on-page code I’m referring to custom pieces of javascript that are being used to describe a user’s journey. Declarations of user specific values (such as IDs or specific monetary amount related to a purchase) are the most common, but also includes more common tracking such as forms and processes.

A simplistic implementation will use something like the following:

s.eVar1 = "jcitizen100";
s.t();
This works from a basic technical perspective, but might cause saint kitts and nevis email list 10828 contact leads problems when it comes to maintainability. Development teams may not fully comprehend why they are setting certain SiteCatalyst variables, and in our experience this has contributed to developer resistance.

Our current preference is to make us of the s.contextData variable by setting a descriptive variable like so:

[javascript]s.contextData[‘user.id’] = ‘jcitizen100’;
s.t();[/javascript]

Much more self-descriptive, and self-descriptive is good.

What is contextData?
The s.contextData variable is simply a JS object, with named properties. It is persistent for as long as the s object is available, and is a handy place to store data related to the current user’s journey.
Post Reply