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:
If the other button is “Share” then the URL should be:
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
ampActionvalues for the CTAs, you can also see in the dashboard which CTA they clicked (instead of all of them being grouped under just
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.