Event Syncing¶
Event syncing is a useful cornerstone of tracking with Orbee. Event Syncing is the technique of syncing events across multiple windows or Browser Frames (usually known and used as IFrames).
Event syncing utilizes a technique called "First-Party Cookies", meaning that cookies are synced between two domains that agree to share data with each other.
Client Side Event Syncing¶
Client Side event syncing is enabled by supplying a targetOrigin
to the Syncing Site's configuration.
This feature utilizes window.postMessage
to sync data from the iframe to the parent site.
Events synced via Client Side are marked with syncOnly
, syncID
, and sourceOrigin
attributes and are NOT SENT to the backend. These
synced events are only pushed into the datalayer for segment usage.
Installation¶
To sync events, we require the existence of two trackers, that agree to sync between their two domains. This is called an Agreement.
If your tracker and site is considered the "parent" or "parental" site, then there are additional requirements. To be a "parental" site, you must be the central site at which the data will be combined and synced.
If you are the parental site, then a CNAME record is required to point towards your Orbee collection servers. The particular values are provided by Orbee during implementation. They should match the following:
CNAME Domain | Orbee Domain |
---|---|
sync.yourdomain.com | wrkspc.####.orb.ee |
This CNAME is used to sync the values between the two trackers.
Configuration¶
Parental Site¶
The parental site only needs to do two things:
- enable event syncing on their tracker
- setup the CNAME above.
Enabling event syncing can be seen in the orbeeAnalytics
plugin
here.
Syncing Site¶
The syncing site requires the addition of the eventSync
plugin. This plugin
provides the following configuration parameters:
Variable | Type | Required | Description |
---|---|---|---|
trackerID | string | yes | the tracker ID providing the syncing data |
cnameTarget | string | yes | the target to hit so events can be synced |
targetOrigin | string | no | the url of the parent site, this enabled client-side event syncing to occur |
Methods¶
This plugin has no public methods.
Events¶
Generated¶
This plugin generates the following events:
Action | Spec | Trigger |
---|---|---|
associate | { vendor: 'Orbee', product: 'EventSync', object: 'user', entities: [ { object: 'user', association: 'userId,visitId,siteTrackerId', vendor: 'Orbee', product: 'Site Tracker', userId: '', visitId: '', siteTrackerId: '' }, { object: 'user', association: 'userId,visitId,siteTrackerId', vendor: 'Orbee', product: 'Site Tracker', userId: '', visitId: '', siteTrackerId: '' } ]} |
association between frames (parent and syncer) on success |
Listening¶
This plugin does not listen for any events.
Dependencies¶
This plugin only requires the orbeeAnalytics
plugin, with the given configured trackerID
.