This article takes you through the following.
- Verifying events and actions your app sends to Marketing Cloud Personalization.
- Testing mobile data campaigns
- Troubleshooting campaigns
- Testing campaign URLs on your mobile device
The Event Stream on the Personalization UI enables you to verify the events and actions your app sends to Personalization.
To check the incoming event stream, do the following.
- Log in to the Personalization UI and select the Dataset.
- From the left-hand menu, click Reports > Event Stream.
- Set the Event Type filter to Mobile and look for actions sent by the app.
If you followed the steps in the Tracking guide and are still not seeing any mobile events appear in the specified dataset, get assistance by logging a support ticket.
- Created a mobile data campaign for your dataset/app in the Personalization UI.
- Implemented an
EVGCampaignHandlerfor the campaign's target.
- Tracked actions/events from the same
[UIViewController(Evergage) evergageScreen]as the
To test your campaign, put a breakpoint in your campaign handler, and navigate to the screen with that campaign handler and action/event.
When testing your mobile campaigns, consider the following.
- If you are testing or integrating on a non-production dataset, consider setting the campaign to
Published. As long as the rules are easy to fulfill, you can use the app as a user would.
- If you are on a production dataset, you should set the campaign to
Testingand enter test URLs in the mobile browser on the device. For more information on test URLs, see Test URLs on Device.
To test your mobile campaign, put a breakpoint in your campaign handler and navigate to the screen with that campaign handler and action/event.
If your campaign handler is not getting called, there are a few things to troubleshoot:
- The campaign should typically include at least one rule, typically action-based (see
[EVGContext trackAction:]) or item-based (see
[EVGContext viewItem:]). Ensure the context is tracking an action or interaction that fulfills the rule.
- On the same context (
[UIViewController(Evergage) evergageScreen]or less commonly
[Evergage globalContext]), before tracking the action/interaction, ensure
[EVGContext setCampaignHandler:forTarget:]is called.
- Make sure the target defined in the mobile data campaign in the Personalization UI corresponds to the target used in
[EVGContext setCampaignHandler:forTarget:]. It is case-sensitive.
- Ensure any campaign rules are reasonable and being fulfilled.
- If the campaign is unpublished, use Test URLs in the mobile browser on the device.
- Ensure the campaign's key/value pairs have valid formats, and provide fallback or default values as desired. If a value cannot be determined, the campaign will not be sent. If using a recipe for recommendations, test that the recipe is providing results.
- Consider temporarily using simpler or static key/value pairs.
- Consider temporarily removing or loosening campaign rules.
Also worth checking:
- You may want the campaign control percentage to be 0% while testing. The default is 10%.
- Make sure the key(s) defined in the campaign match the key(s) the campaign handler expects.
If you've followed these steps and are still having issues with your campaign, please log a support ticket.
To easily manage test campaigns from the device without any additional code, you can open campaign-related URLs in the mobile browser. For this to work, your app must satisfy the following conditions.
- You must configure your app to use the app's Personalization URL scheme.
- Define a
UIApplicationDelegateopen-URL method that Personalization can also listen to. For more information, see
Test URLs can enable all test campaigns, a specific experience, or disable testing. For information on test URL formats, see
To start testing, once the Personalization-integrated app is on the device, open Safari on a mobile device and enter a test URL. The app should launch and you should see a confirmation message appear.
You can also find generated test URLs in the Personalization UI. Under Campaigns, select the mobile campaign you want to test. These URLs are:
- Based on the app's Personalization AppID. On opening these URLs they will redirect to URLs based on the app's Personalization URL Scheme, as defined in
- Generated using the Personalization AppID of the first app used in a Campaign Source Rule or the AppID of the first enabled app found.
To register the Personalization URL scheme, do the following.
- Under the Info tab, add a URL Type in your app target.
- Under URL Schemes, enter the URL scheme from the Personalization UI. (Select Dataset, navigate from the left-hand menu Mobile > (this app), scroll down to see the app's URL Scheme (format "evgxxxxx"))
- Under Identifier, enter
BundleIDis the app's Bundle ID, as found in Personalization UI. (Select Dataset, Mobile > this app) and in Xcode app Target: (General > Bundle Identifier). For example, if the app's Bundle ID is
com.company.app, then the Identifier should be