Property Targeting

When sending events or or data about a visitor, you should specify the property that should receive the information. This is accomplished with Property Targeting. When creating a property with the Installation Snippet, you define a SiteName. This is used as a prefix on commands to set the target.

For example, this code will create a new site registration on the page and give it the name SiteName.

center('create', 'YOUR_PID_GOES_HERE', 'SiteName');

To send events to this site, use commands that are prefixed with SiteName and a period.

center('SiteName.send', 'Click', 'TrialButton');

This syntax is used before optionally specifying a Plugin function to execute.


Global Targeting

You may want to send data to all properties registered on the page. To do so, omit the prefix and issue the naked command. All properties that have been created as of the command will receive a copy of the event.

center('create', 'PID1', 'Site1');
center('create', 'PID2', 'Site2');
center('send', 'Click', 'TrialButton');

In the previous example, both Site1 and Site2 will get the Click event.