Setting up Goal Tracking for Contact Form 7
Google Analytics Goal tracking with Contact form 7
I’ve set this up for various clients in the past and I tend to see this asked frequently, so I’m making a note of it here.
Step 1 – Login to Google Analytics
Once your login to your GA account head over to your dashboard, select Goals from within the View menu.
Step 2 – Create a New Goal
Simple choose a name for your goal. Example for a contact form on your contact us page I would name it “Lead Form”.
Now choose the option “Destination” from the type options.
Step 3 – Goal Destination
For a URL destination on this goal, we will be choosing a URL that doesn’t exist. Something like “/goals/lead-form/”. Complete the rest of the goal as necessary to finish the set-up of your new goal.
Step 4 — Add Custom Code Snippet to Contact Form 7
You’ll need to place the following code (example) Conversion Tracking Code for Contact Form 7 that we setup in the “Additional Settings” tab of your Contact form
Universal Analytics Code Example:
on_sent_ok: "ga('send', 'pageview', '/goals/thank-you/');"
Step 5 — Log into AdWords and Import your Goals
https://support.google.com/analytics/answer/1034306?hl=en