Enabling Analytics
Most solutions provided by Epigraph support capturing some analytics events that allow for a better understanding of how the users interact with these experiences. In order to do so and to ensure that this works with the user's consent. There are some scripts that are required to be imported on the webpage.
// Imports google tag manager on this page
<script
async
src="https://www.googletagmanager.com/gtag/js?id=<insert_your_measurement_id>"
></script>
// Sets up the queuing system for managing analytics events when it's ready
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "<insert_your_measurement_id>");
</script>In order to send these events to the correct analytics account, there also needs to be a measurement ID provided to the configurator. This would be unique per experience.
<epigraph-configurator
id="epigraphConfigurator"
client-access-key="access-key-provided-by-epigraph"
ga-measurement-id="<insert_your_measurement_id>"
></epigraph-configurator>
You're all set! Epigraph will fire events to your GA4 Measurement ID and provide dashboards with how your Configurator is performing.
Updated 8 months ago
