Trackla JavaScript API Reference

Trigger an Trackla Event

To Trigger a tracking event, simply trigger an event on the DOM document.

$(document).trigger(EventName, [arrayOfTileObjects]);
Event Name Argument Description Object
tilesAppend An array of Tile Objects,
e.g
$(document).trigger(’tilesAppend’, [[tileObject1, tileObject2]]);
This event is fired when a Tile is appended to the container DOM, this event will trigger a Tile Impression in Trackla.


Note: Trackla only recognises one Tile impression per tile per page load, to trigger a second Tile impression on the same page load, please refer to tilesReappear

TileObject.tracking_events.impressions and
TagObject.tracking_tile_impressions
tileClick or tileExpand Single Tile Object, e.g $(document).trigger(’tileClick’, [tileObject]) This event is fired when a Tile is expanded, this event will trigger a Tile Clicks in Trackla TileObject.tracking_events.clicks and
TagObject.tracking_tile_clicks
tilesReappear An array of Tile Objects,
e.g
$(document).trigger(’tilesAppend’, [[tileObject1, tileObject2]]);
This event is fired when a Tile reappears again on the view port after it has made its first appearance. This event is typically used in an Event Screen display. TileObject.tracking_events.impressions and
TagObject.tracking_tile_impressions
Likes and Dislike Single Tile Object, e.g $(document).trigger(’tileLike’, [tileObject]) Like/Dislike Interaction on a Tile TileObject.numUps or TileObject.numDowns
Shared Single Tile Object, e.g $(document).trigger(’tileShare’, [tileObject]) Sharing a Tile TileObject.stackla_shares
Votes Single Tile Object, e.g $(document).trigger(’tileVote’, [tileObject]) Vote Interaction on a Tile TileObject.numVotes
Comments Single Tile Object, e.g $(document).trigger(’tileComment’, [tileObject]) Comment on a Tile TileObject.numComments
load Widget ID, e.g $(document).trigger(‘load’, [{id: WidgetID}]) Widget is loaded, this event is for widget impression only. WidgetObject.tracking_impressions