Configuring tag rules to support Adobe Campaign Standard use cases configuring-rules-launch
In the Data Collection UI, create data elements and rules to send PII and other data from mobile applications to Adobe Campaign Standard.
To ensure that all configuration changes in the Data Collection UI take effect, you must publish these changes. For more information, see Publishing.
To create rules in the Data Collection UI, follow these steps:
-
Creating rules for use cases you want to support:
Creating data elements create-data-elements
Here are the data elements we recommend that you create in the Data Collection UI.
You can create additional data elements as per your needs.
- Experience Cloud ID
- Pkey
- Campaign server
To create these data elements:
-
In the Data Collection UI, from your mobile application dashboard, click the Data Elements tab.
-
To create the Experience Cloud ID data element, click Create New Data Element.
-
In the Name field, for example, type in mcid.
-
From the Extension drop-down, select Mobile Core. Then Experience Cloud ID in the Data element type drop-down.
-
To create the Pkey data element, click Add data element.
-
In the Name field, for example, type in pkey.
-
From the Extension drop-down, select Adobe Campaign Standard. Then pkey in the Data element type drop-down.
-
To create the Campaign server data element, click Add data element.
-
In the Name field, type a name, for example, camp-server.
-
From the Extension drop-down, select Adobe Campaign Standard. Then, Campaign Server in the Data element type drop-down.
Creating rules creating-rules
You must create rules for the following:
PII postback pii-postback
To send PII data to Adobe Campaign Standard, create a rule in the Data Collection UI:
-
In the Data Collection UI, from your mobile application dashboard, click the Rules tab then Create New Rule.
-
Type a name, for example, Mobile Core - Collect PII.
-
In the Events section, click Add.
-
From the Extension drop-down, select Mobile Core. Then, Collect PII in the Event type drop-down.
-
Click Keep changes.
-
In the Actions section, click Add.
-
From the Extension drop-down, select Mobile Core. Then, Send PII in the Action type drop-down.
-
In URL, enter the following URL:
code language-none https://{%%camp-server%%}/rest/head/mobileAppV5/{%%pkey%%}/subscriptions/{%%mcid%%}
-
Select the Add Post Body check box.
-
In Post Body, type the following:
code language-none { "marketingCloudId": "{%%mcid%%}", "pushPlatform": "{%contextdata.pushPlatform%}", "cusEmail": "{%contextdata.email%}", "cusFirstName": "{%contextdata.firstName%}", "cusLastName": "{%contextdata.lastName%}" }
The marketingCloudId enables you to reconcile your app subscribers with the recipients in the database and, as a result, is required. You can specify other key-value pairs as per your business needs. In the example above, Email, First Name, and Last Name are being passed from the app.
The keys (for example cusEmail, cusFirstName, and cusLastName) should match the field IDs that are defined in your custom resource in the Adobe Campaign Standard instance. The value variables (for example email, firstName, and LastName) should match the keys in the JSON data that is sent from the mobile app while calling the AMS collectPII API from the app code.
You can also pass Lifecycle data in the Collect PII postback or a different postback depending on your Event triggers. here is an example of the Lifecycle data JSON:
code language-none { "marketingCloudId":"{%%mcid%%}", "pushPlatform":"{%contextdata.pushPlatform%}", "cusDayslastlaunch": "{%%DaysSinceLastUse%%}", "cusDaysfirstlaunch": "{%%DaysSinceFirstUse%%}", "cusLaunches": "{%%Launches%%}" }
The data elements that are defined in the Data Collection UI should be enclosed in double percentages, for example
%%mcid%%
, and context variables from app should be enclosed in single percentages, for example %contextdata.email%. -
In Content Type, type application/json.
-
In Timeout, select 0.
Your user data is now configured to be sent to Campaign.
In-App tracking postback inapp-tracking-postback
To send tracking data to Adobe Campaign Standard for reporting on how your users interact with In-App messages in your mobile application, create the following rule in the Data Collection UI:
-
In the Data Collection UI, from your mobile application dashboard, select the Rules tab and click Add Rule.
-
Type a name, for example, Adobe Campaign - In-App click tracking.
-
In the Events section, click Add.
-
From the Extension drop-down, select Adobe Campaign Standard. Then, In-App click tracking in the Event type drop-down.
-
Click Keep changes.
-
In the Actions section, click Add.
-
From the Extension drop-down, select Mobile Core. Then, Send postback in the Event type drop-down.
-
In URL, type the following URL:
code language-none https://{%%camp-server%%}/r/?id={%id%}&mcid={%%mcid%%}
-
Select the Add post body check box.
-
In Post Body, type {}.
-
In Content Type, type application/json.
-
In Timeout, select 0.
Push notifications tracking postback push-tracking-postback
To send tracking data to Adobe Campaign Standard, which helps track your Push notification deliveries and your users’ interaction with your mobile application, you must create a rule in the Data Collection UI.
For more information about push tracking, see Push Tracking.
To track app actions, use the trackAction API. For more information, see Track app actions.
-
In the Data Collection UI, from your mobile application dashboard, click the Rules tab and click Add Rule.
-
Type a name, for example, Adobe Campaign - push click tracking.
-
In the Events section, click Add.
-
From the Extension drop-down, select Mobile Core. Then, Track Action in the Event type drop-down.
-
From the Action drop-down, select Action, select equals, and type tracking.
-
Click Keep changes. Then, in the Actions section, click Add.
-
From the Extension drop-down, select Mobile Core. Then, Send postback in the Action type drop-down.
-
In URL, enter the following URL:
code language-none https://{%%camp-server%%}/r/?id={%contextdata.broadlogId%},{%contextdata.deliveryId%},{%contextdata.action%}&mcId={%%mcid%%}
-
Select the Add post body check box.
-
Add your post body, for example, { }.
-
In Content Type, type application/json.
-
In Timeout, select 0.
Location postback location-postback
-
In the Data Collection UI, from your mobile application dashboard, click the Rules tab and click Add Rule.
-
Type a name, for example, Location postback.
-
In the Events section, click Add.
-
Create an event, for example, Enter POI or Exit POI. From the Extension drop-down, select Places - Beta. Then, Enter POI or Exit POI in the Event type drop-down.
-
Enter a name, for example, Places - Beta - Enter POI or Exit POI.
-
In the Actions section, click Add.
-
From the Extension drop-down, select Mobile Core. Then, Send postback from the Action type drop-down.
-
Enter a name, for example, Mobile Core - Send Location Postback.
-
In URL, enter the following URL:
code language-none https://{%%camp-server%%}/rest/head/mobileAppV5/{%%pkey%%}/locations/
-
Select the Add post body check box and add your post body, for example:
code language-none { "locationData": { "distances": "{%%Distance%%}", "poiLabel": "{%%POILabel%%}", "latitude": "{%%Latitude%%}", "longitude": "{%%Longitude%%}", "appId": "{%%AppId%%}", "marketingCloudId": "{%%ECID%%}" } }
note note NOTE In the example above, the data elements on the right-hand side must be configured in the Data Collection UI by leveraging the steps in Creating data elements. The data elements on the left-hand side are supported in Adobe Campaign Standard and do not need any configuration. If you require additional data, you must carry out custom resource extensions in Adobe Campaign Standard. -
In Content Type, type application/json.
-
In Timeout, select 5.