Personyze Wiki Personyze Wiki docs
English
Open Personyze
Docs/ Content Editor & Variations/ Advanced Functions to Use in Personyze Actions
Content Editor & Variations

Advanced Functions to Use in Personyze Actions

Controlling Click Tracking in Personyze Popups Sometimes, you may want Personyze to track only specific clicks within a popup for analytical accuracy. By default, Personyze tracks all clicks within a popup action. If you'd…

2 min read Updated 2 months ago

Controlling Click Tracking in Personyze Popups

Sometimes, you may want Personyze to track only specific clicks within a popup for analytical accuracy.
By default, Personyze tracks all clicks within a popup action.
If you’d like to limit tracking to certain elements only, define these elements explicitly using the following HTML attribute:

Attribute to use:
data-personyze-click-target=""

Example Usage:

<a>X</a>
<div data-personyze-click-target="">Clickable area that counts as a click</div>

In this example, only clicks on the <div> element are tracked as “clicks” in Personyze analytics.
Clicks on the <a>X</a> would not be tracked, as this element lacks the
data-personyze-click-target attribute.

Important note:

This method applies only to popup actions (and not containers).

Forcing a New Page View

If you need Personyze to recheck all campaigns and clean contenders’ content when moving to a new page,
you can call the following command:

_S_T.log_navigation();
⚠️ Important: Calling _S_T.log_navigation(); forces Personyze to treat this as a
new page view, which may incur additional cost since each page view is counted in analytics and campaign evaluation.

For single-page applications (SPA), you should instead enable the domain setting
“One Page Application” in Personyze, rather than calling _S_T.log_navigation(); manually.

Additional Useful JavaScript Commands:

Close a Popup or HTML Action:

onclick="_S_T.dismiss_action(${action_id});"

Triggering Another Action Using JavaScript:

You can trigger another action from JavaScript (the targeted action must already exist on the page, even if hidden by triggers such as timers or page groups):

_S_T.push(['Fire action', ACTION_ID]);
Get an AI plan for your site

Inspire me reads your website and suggests the personalization campaigns to run first, and who should see each one. Free.

Scan your site
Did this page answer your question?
Thank you — that goes to whoever maintains this page.