Aborting Adobe Mobile SDK Analytics call

ADOBE ANALYTICS

The abort variable in Adobe Web Analytics implementation prevents a tracking call from being sent to Adobe Analytics. Essentially, it stops data collection for a specific event.

Use Cases:

1) Preventing Unnecessary Data Collection:

1.1) Custom Links or External Links in Display Ads: You might not want to track clicks on specific links (e.g., those leading to external sites or certain types of custom links).

1.2) Specific Conditions Not Met: If your analytics implementation requires certain conditions to be met before tracking data (e.g., a campaign ID must be present, or specific events must have occurred).

2) Data Privacy and Compliance:

In situations where a user has opted out of tracking or if certain legal requirements prevent the collection of data under specific circumstances, abort can be used to ensure that no data is sent to Adobe Analytics.

How it Works:

AppMeasurement (Adobe Analytics Extension): The s.abort variable is set to true within the doPlugins() function or other appropriate code sections to prevent the tracking call. s.abort resets to false after each tracking call. Example,

s.doPlugins = function(s) {
s.campaign = s.Util.getQueryParam("cid"); // Get the campaign ID from the query string
if ((!s.campaign) && (!s.events)) { // If there's no campaign ID and no events are set
s.abort = true; // Don't send the tracking call
}
};

However, the above logic is only applicable for the Web Analytics, and NOT for mobile SDK APP analytics, as adobe doesnt have concept of doPlugins for mobile SDK and there is no s.abort variable available for mobile sdk.

Problem in hand:

I recently encountered a scenario where it was an urgent need to suppress some of the trackState/trackAction call, as those were no longer very important to track and causing high number of adobe server call hence $$. Unfortunately waiting for native app developer to remove the trackState/trackAction from those screen, and complete SDLC for app release was not ideal. I started playing around with adobe launch mobile property and came up with a hacky solution.

Solution:

For the demonstration purpose, lets consider I need to abort trackAction calls where customlink is ‘sign in-sign up now’. This is how it looks in Adobe Assurance tool Events log view, when trackAction is working for that link.

First, I created a dataElement to read the contextData customlink. This DE would be used further in the rule condition.

Next, I created a trackAction rule which has condition to check the dataElement value to ensure the rule doesnt fire across all trackAction.

The Rule

Rule — Event

Rule — Condition

Next, I reset the contextData object and action in the Rule-Action ModifyData

After making these changes in dev library, I noticed that Charles proxy tool and Assurance both, no longer show any trackAction calls to Adobe Analytics server.

It seems this hacky solution is working in dev build. Please note that I didnt deploy this code in production while writing this blog, as I had few more other things to follow(not related to this change) for a prod deployment.

Let me know if you tried this solution, and did this help ?

15+ years of IT work experience as Technical delivery Lead, Analytics Architect, AEP/CJA Implementation Consultant.

Adobe certified expert in Adobe Analytics, Adobe Target, Adobe Experience Platform (AEP), Real-Time Customer Data Platform (RT-CDP), Customer Journey Analytics (CJA), Journey Optimizer (AJO). Well versed with Google Analytics Server-side, Conversion API (CAPI), Privacy & Consent Management (OneTrust).

Deputed to Canada, USA, Netherlands, Germany, UK to work closely with business clients, business analysts, solution architects, solution designers, and other key stakeholders. Passionate to decode the online consumer behaviour by using an analytics data-driven approach.