Today I experienced something that confirms that this affects SEO.
I just received a warning from the Google Search Console about an increase of 404 errors, and almost the entire URL in the error is in this form: /some-path/some-page/$%7Bconsent.infoURL%7D .
Once the URL is decoded, we can see that ${consent.infoURL} is the variable that I use in the template tag, in the href attribute:
<template data-template="cookie-notice"> `<div data-cookie-notice class="cookie-notice" role="dialog"> <span class="cookie-notice-caption">${consent.captionText}</span> <a class="cookie-notice-link" href="${consent.infoURL}">${consent.linkText}</a> <button data-button-consent type="button" class="cookie-notice-button">${consent.buttonText}</a> </div>` </template>
So, Google Bot really follows the links in the template tags.
source share