Google Analytics
A typical usecase for a lot of our customers is to place a pixel on the landing page onto which the Tellescope intake form is embedded (typically we see our customers place a form in an iframe on their website), and then another pixel on a landing page which is redirected to upon Form submission (see screenshot re: redirect below)
Tellescope emits the following events (accompanied by the formId and uniqueEventId) as a patient starts, progresses through, and ultimately submits a form:
- public_form_start
- form_progress
- form_submitted
Sample Event:
{
"event": "public_form_start",
"formId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"gtm.uniqueEventId": 1
}These are then recorded in Google Analytics (using the provided GA4 ID).
Additionally, one could add a Google Tag Manager Tag that will be activated upon form initiation, and passed on to the defined GA4 ID.
Tracking UTMs
How to input the UTMs
- Add the UTM info at the end of your Tellescope public form ID
- Create the following custom fields in Tellescope as relevant to your usecase
Where do UTMs show up in Tellescope
- When UTM parameters (e.g. values that start with "utm_") are included in a Tellescope URL, we include them in the stored responses (for forms) and on the patient's profile as custom fields
- You would then be able to run analytics based on the entries in these fields. One example is the following card report.
If your campaign leads to a Landing Page (as opposed to straight into a form), we have sample code to help pull UTMs from your landing page to your form and into Tellscope for tracking. Please note that Tellescope does NOT provide support for this type of code and we would ask you review internally.
<iframe src="https://www.wikipedia.org" id="unique-tellescope-embed-id" onload="(() => { const target = document.getElementById('unique-tellescope-embed-id') const append_current_utm_params = (targetURL) => { try { const params = new URLSearchParams(window.location.search) const utmParams = {} params.forEach((value, key) => { if (key.toLowerCase().startsWith('utm_')) { utmParams[key] = value } }) if (Object.keys(utmParams).length === 0) { return targetURL } let modifiedURL = targetURL if (!modifiedURL.includes('?')) { modifiedURL += '?' } else if (!modifiedURL.endsWith('&')) { modifiedURL += '&' } for (const param in utmParams) { modifiedURL += `${param}=${utmParams[param]}&` } return modifiedURL } catch(err) { console.error(err) }; return targetURL } if (target.src.includes('utm')) { return } if (!window.location.href.includes('utm')) { return } target.src = append_current_utm_params(target.src) })()" />
Comments
0 comments
Article is closed for comments.