Website tagging

Track your user's activity in your website

Xtremepush has several methods for tagging activity on your site which allows you to tag page impressions, any other interactions for analytics and real-time events to trigger comms.

Tag interactions

To tag interactions for analytics and the ability to segment campaigns based on tag behaviour call the tag method where that interaction occurs as shown:

// You might for example want to tag a registration event
xtremepush('tag', 'registration_complete');

To tag interactions that capture a value and grab the value, use the tag method with the value option, for example:

// You might for example want to capture a field value from a form being filled out
xtremepush('tag', 'journeyform_destination', 'New York');

Track page impressions

To count page impressions call the impression SDK method where your page loads:

// Send impression to track page impressions
xtremepush('impression', 'sport_home');

The value used to record a page impression should uniquely identify a page.

Capture device profile attributes

To capture a device attributeattribute - Attributes (and tags) are predefined keys allowing data values to be stored against a user profile or devices. An attribute is linked one-to-one to a user profile or a device profile, holding a single value that may be updated at any time, for example, "First Name" or "Membership Level". Attributes may be used for segmentation or personalisation of messaging campaigns. you can use the following syntax:

// You might for example want to capture the gender of a registered user
xtremepush('tag', 'user_gender', 'Male');

Did this page help you?