Hi Team,
I am attempting to set up analytics for each CTA on the Answers experience, as opposed to one metric for CTA_CLICK by following the instructions in this Community post.
We set up CTA1 with a label in the eventOptions object in November and we just started seeing the data flow through in the report. (We only set up CTA2/3 this week so we don’t expect to see it immediately). Is three months the expected time frame for analytics for the label to come through?
Prior to that, we would get the message, “There is no data in the range you have selected.
If your account is new, wait a few weeks for data to become available.”
Since we would like to see data a bit quicker, we tried setting up Conversion tracking and changing the event type for each CTA. There was already conversion set up for Driving Directions so we added ones for Virtual Visit and Book a Ride. The Conversion Tracking screen said that it takes about 24 hours for it to be fully set up but we are still not seeing it in this report.
Can you please advise if there’s anything we’re missing in this process to get the data to flow through quicker?
Best,
Janet
Hey Janet,
Once you add a CTA Label to an event, it should show up immediately in Analytics the next time that click is fired. Generally, the clicks would not show in Report Builder if:
- The CTA Label is set up incorrectly for the click
- There are no clicks on the element the CTA Label is set up for
- There is some bug with the SDK version you are on (less common, but this would indicate a larger issue, so it’s most likely one of the first two)
For anyone who is trying to set up a CTA Label, I’d recommend testing the setup to make sure it is working properly (learn more about how to do this in the Analytics QA unit). This will address both of the first two scenarios.
On #2, your test clicks will give you some data to surface in Analytics. Remember that your testing clicks will register as internal traffic clicks since you’ve logged in to the Yext platform (learn more about internal vs. external traffic in the IP Filtering unit), so be sure you are not filtered to external traffic when trying to view them.
On #1, as you QA your analytics, you’ll quickly see if the CTA Label was set up correctly - you’ll get a successful API call in the Network requests tab. If it’s not a successful call, you’ll get an error message to help you debug it further.
In your case, it looks like your analytics requests are failing because you’re using an invalid eventType
for these clicks (see valid event types in the Answers Analytics Event Types unit). You’ll need to use a valid event type from this list. If it doesn’t fit into any of the specific event types, you can use CTA_Click
and then use CTA Label to further break down those clicks in Analytics.
If you’ve QA’d your analytics and found the clicks are returning successful API requests, then this could be a bug. In that case, please post it in the Community for us to check and we’ll escalate it to the appropriate team.
Hope this helps!
Thank you for the explanation!
@Kristy_Huang Hi Kristy! Quick follow up question on this: Are we also able to create CTA labels for the phone number? We would like to see all the clicks in one view and we can’t have a report that shows Answers Clicks by Type and Label. So would it be possible to add a label to this line of code?
Hey Janet,
Yes, you can add CTA labels for the phone number the same way the Community post you linked above add it to CTA clicks. However, you’ll want to add this to the property phoneEventOptions
instead of eventOptions
.
More detail below:
Based on your screenshot, I think you’re using the built-in location-standard
card. This will also apply to the professional-location
and financial-professional-location
card. All of these “location” cards have a phone number built in to the HBS and JS files of the card. If you look at the template.hbs of the location-standard
card, there is an Analytics click type of “TAP_TO_CALL” associated with the phone number, so you know clicks here will show up in Report Builder.
This click also adds event options with the property phoneEventOptions
. You’ll want to edit that in the component.js file with the CTA label event option. It’ll look something like this:
phone: Formatter.nationalizedPhoneDisplay(profile), // The phone number for the card
phoneEventOptions: this.addDefaultEventOptions({ ctaLabel : "My custom label" }), // The analytics event options for phone clicks
Once you’ve set this up, be sure to test it like above to make sure it’s working. Let us know if you have any issues!