Testing
Verifying Events/Actions
Verify the events/actions the app is sending to Evergage. In the Evergage web app, check the stream of received events/actions: Select Dataset, then from the left-hand menu Reports > Event Stream, and set the “Event Type” filter to “Mobile” (you may need to scroll down), and look for actions sent by the app.
Event Troubleshooting
If you followed the Tracking Guide and you are not seeing any mobile events appear in the specified dataset of your Evergage account, please contact support@evergage.com for further assistance.
Testing Campaigns
You’re ready to test your campaign once you’ve done the following steps from the Mobile Data Campaigns Guide and the Tracking Guide:
- Created a Mobile Data Campaign for your dataset/app in the Evergage web UI
- Implemented an
EVGCampaignHandler
for the campaign’s target - Tracking actions/events from the same
[UIViewController(Evergage) evergageScreen]
as the EVGCampaignHandler
Put a breakpoint in your campaign handler, and navigate to the screen with that campaign handler and action/event.
- If you are testing/integrating on a non-production dataset, consider setting the campaign to Published. As long as the rules are easy to fulfill, you can simply use the app as the user would.
- If you are on a production dataset, you should set the campaign to Testing and enter test URLs in the mobile browser on the device. See “Test URLs on Device” below.
Campaign Troubleshooting
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 (see
[EVGContext trackAction:]
) or item based (see[EVGContext viewItem:]
etc). Ensure the context is tracking an action/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 Evergage web 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 the Test URLs in the mobile browser on the device.
- Ensure the campaign’s key/value pairs have valid formats, and provide fallback/default values as desired/supported. If a value cannot be determined/found, the campaign will not be sent. If using a recipe for recommendations, test that the recipe is providing results.
- Consider temporarily using simpler/static key/value pairs.
- Consider temporarily removing/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 contact support@evergage.com for further assistance.
Test URLs on Device
To easily and codelessly manage test campaigns from the device, the user can open related URLs in the mobile browser. For this to work, the app must:
- Be configured to use the app’s ‘Evergage’s URL scheme.
- Define a UIApplicationDelegate open-URL method that Evergage can also listen to.
See
[Evergage(Swizzling) handleOpenURL:]
.
Test URLs can enable all test campaigns, a specific experience, or disable testing.
See [Evergage(Swizzling) handleOpenURL:]
for the test URL formats.
To start testing, once the Evergage-integrated app is on the device, open mobile Safari on the 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 Evergage web app. Under Campaigns, select the mobile campaign you want to test. These URLs are:
- Based off the app’s Evergage AppID, but upon opening these URLs they will redirect to
URLs based off the app’s Evergage URL Scheme, as defined in
[Evergage(Swizzling) handleOpenURL:]
. - Generated using the Evergage AppID of the first app used in a Campaign Source Rule, or the AppID of the first enabled app found.
Register Evergage URL Scheme
- Add an URL Type in your app target under the Info tab.
- Under “URL Schemes”, enter the URL Scheme from the Evergage web app: 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 BundleID.evgscheme, where ‘BundleID’ is the app’s Bundle ID, as found in Evergage web app: (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 “com.company.app.evgscheme”.