The Ensighten Mobile UI has a very useful section when setting up Events. This is the ability to add an Integration to various products, such as Google Analytics and Adobe Analytics:
It’s pretty simple really. When a Mobile Event is created in the Mobile UI you do not have to add a Tag directly:
You can ‘Save’ or ‘Save & Commit’ without specifying what Tags should be fired on this Mobile Event. This can be done in Manage.
For example, let’s say I want to send a Facebook Pixel on a button click, I can configure my pixel in the Facebook App in Manage and when I get to the stage where I select when the pixel is fired:
I can select Events and filter my options by putting ‘click - test’, which is the first part of my event name, in the name filter. My Mobile App ID is called ‘testapp’ and I’m using the default version of my App so I know it’s the value in this example:
Whenever the button click Mobile event is called then this Facebook pixel will be fired by Manage.
However, what if you only want to fire this tag on a specific button click?
If that is the case, then you can create a named event in Manage which can control when your Tag is fired.
My Facebook pixel Tag example can then be changed to fire on the calling of this event:
So, with this set up, how do I fire this pixel only on a particular button click? This can be done in the Mobile UI. You will know the name of the button that’s been clicked as it will be part of the Event Name value or be in the data layer call from the Ensighten Tracker. In this example, the Event Name is the button click name ‘feedbackButton’.
In the Event Tracker you already have the Event passing through all the data you require for a button click in the ‘Event-Specific Tokens’ and ‘Global Tokens’ but you can add ‘Custom Tokens’ as well. The Custom Token will control which Event will be called in Manage and in turn which Tag will fire.
In this Custom Token, all we are doing is giving the variable ‘tagEvent’ the value from the Event Token, which is the button name in this example. Then we are selecting which Event to fire depending on the value in ‘tagEvent’. If the value is ‘feedbackButton’ then we will trigger the Event ‘Event Test’ which will fire the Facebook Pixel Tag in Manage. You can have multiple case statements in here to control firing of other Tags on different button clicks or just have a default setting as per the example to catch all other scenarios.
If you have any questions regarding this then please contact our support team at firstname.lastname@example.org
Please sign in to leave a comment.