I just set up click based conversion tracking for a client of mine using the instructions in this training module. We set up click based Conversion Tracking for Product entities and are interested in quantifying the number of clicks on the Apply Now CTA. I set up the Conversion Action with the following attributes:
Conversion Type: Lead
Conversion Trigger: Clicks
Click Type: Apply Now
Medium: Answers
Entities: All Product entities
I’ve tested that the Conversion Action is working properly and realized that despite there being an Apply Now CTA, the click type is registered as a CTA Click - as a result no Conversions are being registered. I need to be able to separate Application clicks (Apply Now CTA) from general CTA clicks (Learn More and View Rates) for Product entities.
Does anyone have a recommendation in terms of how to set this up?
Circling back here as I found a solution! This can be achieved by modifying the relevant card’s component.js file. As you can see in the screenshot below, the Primary and Secondary CTAs are explicitly defined, and more importantly so are the eventTypes.
In this particular example, all Product entities have a ‘Learn More’ Primary CTA, redirecting the user to the Product’s landing page, while each product entity also has an ‘Apply Now’ Secondary CTA, which redirects the user to a page in which they can apply for the product. With that being said, I changed the event type for the secondary CTA from “CTA_CLICK” to “APPLY_NOW”. I’m now able to differentiate between clicks on the Primary and Secondary CTAs for Product entities.
The last step is to create two separate conversion actions, one for Primary CTA clicks and one for Secondary CTA clicks.
Just to follow up, is it possible to backdate these changes in conversion tracking? For example, I’ve updated the click type for one of my CTAs and was wondering if I could see historical conversions based on this new label.
I strongly suspect this might not be possible but wanted to check.
You’re correct - you cannot retroactively update clicks to use your newly updated Click Type. Only Clicks going forward will be categorized as this new Click Type.
I have a similar need where I have click based conversion set up for a client, and I want to be able to quantify the number of clicks specifically for ‘Set up your account’, which is a secondary CTA. I was able to take Austin’s steps above where I created a separate conversion action for the secondary CTA where the conversion action click type is ‘Apply Now’ and the eventType in the card for the secondary CTA is ‘Apply_Now’.
When I create a custom report, I can use the ‘Clicks’ metric, dimensioned by ‘Click Type’ and ‘All Entities’, to see the different click types (i.e. ‘Call to Action’ for all other ctas vs. ‘Apply Now’ for the secondary cta), as well as the corresponding entity they are attributed to.
However, the secondary CTAs for all entities are not the same, so one entity may have ‘Set up your account’ as the secondary CTA with a specific URL, and another entity might have ‘Log in’ as the secondary CTA with another URL. So in my custom report, I still can’t tell which specific label for the secondary CTA the user is clicking on. In order to check, I would have to see which entity the report is referring to, cross reference information in the appropriate knowledge graph field, and confirm if it is the correct secondary CTA ‘Set up your account’ that I am looking to track. Another option would be to download the report results, as well as all FAQ CTA information from the knowledge graph, and use excel to match the ‘Apply Now’ indicators to the correct entity so I can highlight when the correct secondary CTA has been clicked.
This may leave room for some error so it would be helpful to further customize or specify, in analytics reporting, which specific CTA URL is being clicked on or which CTA label shown in the knowledge graph is being clicked on. Is this possible?
For your CTAs, you can specify a separate CTA Label, which is passed in the analytics request and logged with the event. (This is separate from the label that’s displayed in the frontend, which is not passed in the analytics request.)
Here’s how you’d set up this extra attribute – in the CTA, pass the label as an object with a ctaLabel to the eventOptions attribute , like this:
CTA1: {
label: profile.c_primaryCTA ? profile.c_primaryCTA.label : null, // The CTA's label
iconName: 'chevron', // The icon to use for the CTA
url: Formatter.generateCTAFieldTypeLink(profile.c_primaryCTA), // The URL a user will be directed to when clicking
target: '_top', // Where the new URL will be opened
eventType: 'CTA_CLICK', // Type of Analytics event fired when clicking the CTA
eventOptions: this.addDefaultEventOptions({ ctaLabel : "My custom label" })
},
This will insure the “My custom label” is logged with any click of this CTA. Said CTA Label will be available as a dimension in Analytics with GA of the Spring Release (mid April).
Quick follow-up on my end. To confirm, you’re suggesting to specify these extra attributes in the relevant card’s component.js file, yes?
If so, from my understanding this will fire the same analytics event any time the profile field mapped to CTA 1 is clicked – and will not distinguish clicks between different text/landing page URLs specified within the CTA 1 field of separate entities of the same type/tied to the same search vertical. Is this correct?
For example, for FAQ (18720171) and FAQ (18720225). In particular, note that CTA 1 for the first entity is ‘Use the App’ while CTA 1 for the second entity is ‘Log into your account’.
Under the configuration you denoted above, wouldn’t the ‘My custom label’ label/analytics event fire just the same on both of these CTA 1s, even though they are different texts (and different landing Page URLs)? Let me know if I’m misunderstanding that!
Essentially, we are looking to disambiguate clicks on CTAs in cases such as the above. This will allow us to specifically track individual CTAs stored in the CTA 1 field that are tied to new business acquisition (i.e., ‘Sign up now!’, ‘Create an account’, etc.)
Hey @Will_Walker, that’s correct, you’re adding these to the component.js file for the card.
And you are also correct, as outlined, the CTA Label is a static value, so would be the same for each FAQ clicked. However, you could make the value a variable instead and use any attribute of the entity’s profile, like this:
dataForRender(profile) {
var ctaLabelValue = "My custom label - " + profile.id;
return {
title: profile.name, // The header text of the card
url: profile.website || profile.landingPageUrl, // If the card title is a clickable link, set URL here
target: '_top', // If the title's URL should open in a new tab, etc.
// other fields here
// The primary CTA of the card
CTA1: {
label: profile.c_primaryCTA ? profile.c_primaryCTA.label : null, // The CTA's label
iconName: 'chevron', // The icon to use for the CTA
url: Formatter.generateCTAFieldTypeLink(profile.c_primaryCTA), // The URL a user will be directed to when clicking
target: '_top', // Where the new URL will be opened
eventType: 'CTA_CLICK', // Type of Analytics event fired when clicking the CTA
eventOptions: this.addDefaultEventOptions({ ctaLabel : ctaLabelValue })
},
// other CTA here
};
}
For the first FAQ you referenced, the label will be My custom label - 18720171. You can use any field on the entity in this variable (IE say you wanted the label to be the name of the entity, you’d set var ctaLabelValue = profile.name). With this strategy, keep in mind that the entity data in the knowledge graph can change. This will cause inconsistencies in your analytics; we’d therefore recommend picking values you expect to remain consistent, like the entity ID (this will depend on how your knowledge graph is configured).
Hey @roser ! This is extremely helpful. Thanks so much!
One super quick follow-up/confirmation: I can specify two (or more) different variables to return on two (or more) different CTAs for the same entity, yes?
I think that, if we do this, we can achieve our desired use case.
Ideal solution will likely look as follows:
Create custom label variables in component.js file that call specific custom fields that are entity-specific. These will allow me to return, on an entity-by-entity level, exact and differentiated analytics events based on whether someone clicked CTA 1 vs. CTA 2 vs. CTA 3 vs… CTA N.
Create custom fields in the Yext platform to use as part of these custom labels I’m firing in the component.js file. For example, all CTAs that have the text ‘create new account’ can have a custom field filled out with ‘New Account Click’ that can be used to build a custom label in the component.js file.
We can perform a data upload to ensure all entities have the proper custom fields denoting which of their CTAs map to the relevant Analytics events we want to capture.
Analytics should start filling in.
@Jade_Williams - I think this solution should work for our client. We can schedule time to discuss as well!
Hey Will – I might be a little confused about the exact details of your use case, but yes, you can create as many different variables as you’d like, however each CTA can only gets one label.
If you’re going to use the CTA label that’s displayed in the frontend (like “Create New Account”), you might consider using that same attribute in the ctaLabel that’s passed to analytics (instead of creating a new field in the knowledge graph.) In other words, your variable would become var ctaLabelValue = "My custom label - " + profile.c_primaryCTA.label;
Hi @roser ,
I have a similar follow up question to Will above. If I have a primary and secondary CTA on FAQs, can I set 2 CTA variables?
For example, "My custom label - " + profile.c_primaryCTA.label AND "My custom label - " + profile.c_secondaryCTA.label
Ultimately, I am looking to differentiate between primary and secondary CTA clicks. Let me know if there is a different best practice to achieve this result as well.
Very similar situation to the above situations but I have more specific questions.
My scenario: I have the same three CTAs on all entities for a given entity type. They are all set as ‘CTA_CLICK’ for the eventType. For eventOptions, I have set it with a custom label like this.addDefaultEventOptions({ ctaLabel : “Build” }). I have a conversion action set up with the following:
Click Type: Call to Action
Medium: All Answers Experiences
Entities: Vehicles
My question here is will these labels display as dimensions for me in a custom report? If so, how would I navigate to them? Another question is did I miss any steps?
My goal is to differentiate the number of clicks for each CTA.
@Rohan_Mathew Currently you cannot differentiate or segment by CTA Label in Conversion Tracking so you’ll only be able to track Conversions and report on Conversions at the CTA_CLICK level. Being able to do this is on our backlog but we do not have any ETA on when we’ll get to this.
However in Report Builder and in Dashboards you CAN segment these Clicks by using the Click Label dimension.
We recently added a new Reservation CTA and we need to be able to track the conversion actions separately from the other CTAs on this vertical.
This new CTA is configured a bit differently with reservationCtaLabel and reservationCtaUrl placed at the top, instead of nested within something like CTA1. Based on this configuration, is it correct to add reservationCtaEventType and reservationCtaEventOptions as pictured below?