Personalisation framework function reference

The framework offers a selection of methods that allow you to control how personalization works with your frontend.

Tracking

Tracking methods allow you to control when tracking is activated for a user on the frontend. Read this section to learn about the available tracking methods.

init()

Users are automatically tracked and content personalized by default after personalization is activated.

You can control the point at which tracking and personalization are turned on in the frontend if you want to only track and personalize user sessions after users opt-in.

To deactivate automatic tracking go to the Personalisation  Configuration  Includes  Personalisation frontend include asset and remove the `personalisationFramework.init(); ` function.

Now you can activate tracking yourself when desirable.

Usage

personalisationFramework.init();

You must implement the method after the point at which the user opts-in to personalization.

Personalisation

Personalization methods allow you to programmatically change the personas for a user. Read this section to learn about the available personalization methods.

personalise.changePersona()

This method lets users optionally nominate a persona they feel best represents them from a list of available personas.

This can either be in conjunction with the persona automatically selected for the user or can override persona information stored in session data.

Usage

personalisationFramework.personalise.changePersona(key, clear_values);

Parameters

Argument Type Description

key

string (required)

The unique persona key for the user session.

clear_values

boolean (false)

Determines whether or not to clear existing values. Existing values are not cleared by default.

Models

The following methods allow you to gain insight into the page data model. Read this section to learn about the available data model methods.

personalise.containerAttributes

This method lets you retrieve the data structure of the personalized containers (page model).

Usage

personalisationFramework.personalise.containerAttributes

Return values

An array of objects containing container attributes.

© 2015-2020 Squiz Pty Ltd