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 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:

  1. In the Data Collection UI, from your mobile application dashboard, click the Data Elements tab.

  2. To create the Experience Cloud ID data element, click Create New Data Element.

  3. In the Name field, for example, type in mcid.

  4. From the Extension drop-down, select Mobile Core. Then Experience Cloud ID in the Data element type drop-down.

  5. To create the Pkey data element, click Add data element.

  6. In the Name field, for example, type in pkey.

  7. From the Extension drop-down, select Adobe Campaign Standard. Then pkey in the Data element type drop-down.

  8. To create the Campaign server data element, click Add data element.

  9. In the Name field, type a name, for example, camp-server.

  10. 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

NOTE
To send PII information from a mobile app to Adobe Campaign, you must implement an SDK API. For more information, go to CollectPII.

To send PII data to Adobe Campaign Standard, create a rule in the Data Collection UI:

  1. In the Data Collection UI, from your mobile application dashboard, click the Rules tab then Create New Rule.

  2. Type a name, for example, Mobile Core - Collect PII.

  3. In the Events section, click Add.

  4. From the Extension drop-down, select Mobile Core. Then, Collect PII in the Event type drop-down.

  5. Click Keep changes.

  6. In the Actions section, click Add.

  7. From the Extension drop-down, select Mobile Core. Then, Send PII in the Action type drop-down.

  8. In URL, enter the following URL:

    code language-none
    https://{%%camp-server%%}/rest/head/mobileAppV5/{%%pkey%%}/subscriptions/{%%mcid%%}
    
  9. Select the Add Post Body check box.

  10. 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%.

  11. In Content Type, type application/json.

  12. In Timeout, select 0.

Your user data is now configured to be sent to Campaign.

In-App tracking postback inapp-tracking-postback

NOTE
If you are using Android ACPCore v1.4.0 or later/ iOS ACPCore v2.3.0 or later, configuring tracking postbacks is not required.

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:

  1. In the Data Collection UI, from your mobile application dashboard, select the Rules tab and click Add Rule.

  2. Type a name, for example, Adobe Campaign - In-App click tracking.

  3. In the Events section, click Add.

  4. From the Extension drop-down, select Adobe Campaign Standard. Then, In-App click tracking in the Event type drop-down.

  5. Click Keep changes.

  6. In the Actions section, click Add.

  7. From the Extension drop-down, select Mobile Core. Then, Send postback in the Event type drop-down.

  8. In URL, type the following URL:

    code language-none
    https://{%%camp-server%%}/r/?id={%id%}&mcid={%%mcid%%}
    
  9. Select the Add post body check box.

  10. In Post Body, type {}.

  11. In Content Type, type application/json.

  12. In Timeout, select 0.

Push notifications tracking postback push-tracking-postback

NOTE
If you are using Android ACPCore v1.4.0 or later/ iOS ACPCore v2.3.0 or later, configuring tracking postbacks is not required.

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.

  1. In the Data Collection UI, from your mobile application dashboard, click the Rules tab and click Add Rule.

  2. Type a name, for example, Adobe Campaign - push click tracking.

  3. In the Events section, click Add.

  4. From the Extension drop-down, select Mobile Core. Then, Track Action in the Event type drop-down.

  5. From the Action drop-down, select Action, select equals, and type tracking.

  6. Click Keep changes. Then, in the Actions section, click Add.

  7. From the Extension drop-down, select Mobile Core. Then, Send postback in the Action type drop-down.

  8. In URL, enter the following URL:

    code language-none
    https://{%%camp-server%%}/r/?id={%contextdata.broadlogId%},{%contextdata.deliveryId%},{%contextdata.action%}&mcId={%%mcid%%}
    
  9. Select the Add post body check box.

  10. Add your post body, for example, { }.

  11. In Content Type, type application/json.

  12. In Timeout, select 0.

Location postback location-postback

  1. In the Data Collection UI, from your mobile application dashboard, click the Rules tab and click Add Rule.

  2. Type a name, for example, Location postback.

  3. In the Events section, click Add.

  4. 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.

  5. Enter a name, for example, Places - Beta - Enter POI or Exit POI.

  6. In the Actions section, click Add.

  7. From the Extension drop-down, select Mobile Core. Then, Send postback from the Action type drop-down.

  8. Enter a name, for example, Mobile Core - Send Location Postback.

  9. In URL, enter the following URL:

    code language-none
    https://{%%camp-server%%}/rest/head/mobileAppV5/{%%pkey%%}/locations/
    
  10. 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.
  11. In Content Type, type application/json.

  12. In Timeout, select 5.

recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff