Adding CTAs to Direct Answer Cards

I have direct answer functionality set up for the main phone and address fields for a client. I want to make sure that I’m tracking conversions from those results. Is the best way for me to do that to add a CTA to the direct answer card?

I see that there is a commented out portion to add a CTA in the direct answer card template. To add that CTA to this experience, would I fill in those parameters with the same profile.fieldname convention that we use in other json files? Or do I use the answer.Fieldname format that I see elsewhere in the file?

Here is what the commented out CTA portion in the directanswer card component file looks like:

// CTA: {
// label: ‘’, // The CTA’s label
// iconName: ‘chevron’, // The icon to use for the CTA
// url: ‘’, // 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() // The event options for CTA click analytics
// },

I’ve reviewed the module on Formatting Direct Answers and while it references the possibility of adding CTA to the card, I am still not quite sure how to do so. Thank you so much!

Hi,

I have gone ahead and followed the steps to add a CTA to my direct answer card and now the direct answer card has disappeared entirely. Do not see any console errors, let me know if I am missing something.

Resolved by updating the URL under CTA to ‘www.xyz.com’ instead of the formatter.

Hi Sarah,

Glad it was resolved. Also wanted to confirm we went over this topic in Office Hours in September should you need any more guidance: 🗓 September 22, 2020: Hitchhikers Office Hours

Best,
Alyssa

That’s amazing! Thank you so much @Alyssa_Hubbard!