Hi there
I’ve been asked to add a Google tracking code to a submit form in my Foundry built site.
I’ve been given this -
onClick=“ga(‘send’, ‘event’, { eventCategory: ‘Contact Form’, eventAction: ‘Submit’, eventLabel: ‘Contact Page’});”
Any ideas on how to best add this? I tried with the following but it returned a fatal error - cannot redeclare PHPMailerAutoload()
Any ideas? Cheers
swilliam
(scott williams)
24 May 2019 16:37
2
get rid of the curly quotes (paste it as plain text)
here did you put it?
Hi! - I added it like this…
I’m guessing something is bad in there!
Cheers
teefers
(Doug Bennett)
24 May 2019 17:03
4
Where and how did you add the code?
1 Like
swilliam
(scott williams)
24 May 2019 17:06
5
depending on where/how you added it you may need <script></script
> tags
teefers
(Doug Bennett)
24 May 2019 17:07
6
Might have a look at this video:
2 Likes
Thanks - that deals with Google Analytics generally. My question is for adding tracking code to a specific form send button.
My Call to Action let’s you add events to all kinds of things including buttons and links.
Hi Joe. Can that be integrated into a form to act as a submit button?
swilliam
(scott williams)
26 May 2019 20:11
10
Why don’t you just set up tracking on the Thank You page, simple method that triggers on load.
teefers
(Doug Bennett)
26 May 2019 20:11
11
If you are using Foundry’s forms, I think the buttons are built into the form, but call to action does have an “external Trigger” that allows you to track a form submit. I just ran a quick test with foundry and in preview, it does trigger a “call to action”. In my test case, it just opened a “peek-a-boo”.
It does have Analytics tracking options:
Nice! I’ll give that a try. Cheers
Yes. CTA can trigger based on a form submit. Thanks @teefers
1 Like
system
(system)
Closed
26 June 2019 11:47
14
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.