Localytics in-app messages can be generated without writing code using our creative builder, or you can upload custom HTML/CSS/Javascript which will be rendered as a webview. You may want to include a call to action (also known as a “CTA”) within the creative that, when clicked, links the user to a location outside of the app, like a website or another page within your app.
In order to track clicks when using a custom creative with one or more CTA, you will need to have deep links associated with each button. To correctly track each clickthrough you can use different ampAction values for each button. For example, if one button is “Go to Favorites” then the URL should be:
myApp://favorites?ampExternalOpen=true&Action=favorites
If the other button is “Share” then the URL should be:
myApp://share?ampExternalOpen=true&Action=share
In the above scenario, each button would report an Event called “Favorites” or “Share.”
If there is no ampAction URL parameter, the SDK will not know how to tag the impression, thus it will be tagged as a dismiss by default when the message is closed.
- When ampExternalOpen=true, you are communicating to navigate outside of the in-app (i.e. your phone’s browser), while when ampExternalOpen=false, the URL would be opened inside the in-app view.
- When using different
ampAction
values for the CTAs, you can also see in the dashboard which CTA they clicked (instead of all of them being grouped under justclick
).
It is important to mention that click tracking will not be reported when appending ampAction
on URI’s that lack a scheme://host
format such as mailer functionality (i.e. mailto:) and telephone numbers (i.e. tel:####) unless you are on SDK 4.3 and above.
For more information on our in-app Javascript API, see our docs for iOS and Android. Other in-app messaging documentation is available for iOS and Android as well.