WP Avada Form How to Track Form Submission - wordpress

I have a WP website using Avada theme.
Before runing ads on google,
I want to be able to track form submission for Avada Form.
How am I suppose to do that?
(I have already inserted the GA code below)
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3CWQGHB9KD"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3CWQGHB9KD');
</script>
I have tried looked into the Avada Form's setting. I couldn't find anything useful there.

Related

Google analytics script not found while checking SEO

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TWEZSMMQHV"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TWEZSMMQHV');
</script>
This is the code that I'm using in elementor that I got from Google Analytics. I'm using the insert headers and footers plugin to put the code and have already pasted it in the head section of it. I even tried through the custom code that elementor provides. Can someone please look into it and lemme know why it's being detected, even the source code has the code....

Multiple installations of Global site tag (gtag.js) detected

I have added the gtag like following
<!-- Global site tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-189297876-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxxxx-x');
gtag('config', 'G-xxxxxxxxxx');
gtag('config', 'AW-xxxxxxxxx');
</script>
Here I use the Google Analytics, the AdWords Conversion and the Global-ID.
When I check it with the Google Tag Assistant Plugin of Chrome, I get
I don't know, if this is a problem (the Message "Multiple installations of Global site tag (gtag.js) detected"). Is it only there one time.
If your website is SPA (Single Page Application) it is a normal (known) behavior of the extension.
When you add the Google Ads key to your gtag.js configuration
gtag('config', 'AW-xxxxxxxxxx');
it automatically adds a new tag to your DOM like:
<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXX&l=dataLayer&cx=c"></script>
I'd know why but it is. I found it with trial and error ;)

Refusing Google Analytics cookies for GDPR with Wordpress

This is a new problem I never faced before.
I have a website made with Wordpress. In this site I want to include Google Analytics, so I added the following snippet into my <head>. (With the proper UA, of course)
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXX-X');
</script>
Now, when the page loads, the following cookies are set automatically: _ga, _gat_gtag_UA_XXXXXXXXX_X and _gid
Now, I need to show the users an option to either accept or refuse cookies when visiting my site. For that I choose Cookiebot, to see this dialog.
But when the site opens, before the user had any chance to click either button, the cookies are already set.
Why is this? Am I misunderstanding anything about how cookies/GDPR work?

using global site tag (ga gtag) code for custom tags

Can this one gtag code from GA be used for own tags, or does tag manager need another tag on each page?
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=xxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', xxx');
</script>
As per Google Analytics documentation:
To install the global site tag, copy the following code and paste it immediately after the tag on every page of your site. Replace GA_MEASUREMENT_ID with the ID of the Google Analytics property to which you want to send data. You need only one global snippet per page.
https://developers.google.com/analytics/devguides/collection/gtagjs#install_the_global_site_tag

Google Analytics and Sharepoint Online

I would like to know how and where to add this code to SharePoint and start tracking usage via Google Analytics. I've seen conflicting information about adding to the master page and . When I reupload to Master Pages and Page Layouts the changes are not shown. Can anyone help please?
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxx);
</script>
If you are using the classic pages, you should be able to add your script to the head tag of your masterpage and publish.
If you're using the modern pages, you might be able to use the SPfx extensions.

Resources