Appending a Tracking Code to Answers "Links" Results

Hi Team,

One of my clients is looking to create an internal report via Adobe that compares metrics from their prospective customers that, at some point during their customer journey, touched the Answers experience vs. customers that did not in order to look at things like increased conversions rates, cart sizes, time spent on the site, etc.

To help execute on this, they sent me a list of the following tracking codes to append to all of the CTAs and links in the experience:

?cid=yext_answerpage_faq

?cid=yext_answerpage_links

?cid=yext_answerpage_brands

?cid=yext_answerpage_promotions

I’ve implemented all of the above except for the “links” tracking code, which needs to be appended to every link URL that’s featured in the experience.

I was curious to know if something like this is possible, and if so, what the necessary actions are for implementation. Would including something like the following in their links configuration work as expected?

url: profile.link += ‘?cid=yext_answerpage_links’

Appreciate any insight on this topic and thanks in advance!

  • Brad

Hi Brad,

By links, are you referring to a third-party links backend? Just like a card used for a Knowledge Graph backend, you can update the URL & hardcode any URL parameters added for a links card.

Here’s an example card data mapping with UTM parameters added:

dataForRender(profile) {
    return {
      title: profile.htmlTitle, // The header text of the card
      url: profile.link ? profile.link + '?utm_source=yext&utm_medium=onsite-search' : null, // 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.
      titleEventOptions: this.addDefaultEventOptions(),
      // subtitle: '', // The sub-header text of the card
      // If the card's details are longer than a certain character count, you can truncate the
      // text. A toggle will be supplied that can show or hide the truncated text.
      // showMoreDetails: {
      //   showMoreLimit: 750, // Character count limit
      //   showMoreText: 'Show more', // Label when toggle will show truncated text
      //   showLessText: 'Show less' // Label when toggle will hide truncated text
      // },
      details: profile.htmlSnippet, // The text in the body of the card
    };
  }
}

Let me know if that helps!

Hi Amani,

Super helpful - I just implemented and it works great!

Appreciate the support!
-Brad