Ananlytics is working fine for me when using directly on form. But when I embed the form on my wordpress site, it is not working as event is not getting fired for typeform. I have created and connect GTM for this. But it is also not working for embedded form on website.
Google Analytics for Typeform embedded on wordpress website
Best answer by mathio-tf
Hello
When you embed the form, you should enable sharing of your google analytics instance.
You will most likely need to use the the embed lib version 0 (zero) directly as a snippet and not via Wordpress plugin as it is most likely not supported.
You can use this HTML snippet:
<div
class="typeform-widget"
data-url="https://form.typeform.com/to/<form-id>"
data-share-google-analytics-instance
></div>
<script src="//embed.typeform.com/embed.js"></script>
If you are using the lib in JavaScript you need to pass the shareGoogleAnalyticsInstance variable to config object:
typeformEmbed.makeWidget(
embedElement,
'https://form.typeform.com/to/<form-id>',
{
shareGoogleAnalyticsInstance: true
}
)
More tech details in this Github pull request.
This is currently supported only in embed v0. Embed v1 will support this in future.
Update for Embed lib v1
Our latest embed lib version 1 supports this feature as well.
The attribute is named shareGaInstance
(or data-tf-share-ga-instance
if you use HTML embed code). You can even pass your GA tracking ID (UA-XXXXXX-X) to specify which tracker you want to use in case you have more than one on your website.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.