Tagged: Analytics, CONTACT FORM, conversion, GA, Tracking
-
AuthorPosts
-
July 18, 2016 at 1:26 am #661829
Hi,
I am trying to implement form submission tracking on enfold and I have some confusion.
I have read: http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/
and various other threads with no direct explanation.The thread says: “you will need to replace onclick=\”_gaq.push([‘_trackPageview’, ‘/VP/XXX/XXX’]);\” with your tracking code – it’s just an example”. But do you replace just inside the “” or the whole line? Do I insert all the google tracking code provided by google or only certain parts?
Your function code example for the child theme is:
– – – – – – – – – – – –
add_filter(‘avf_contact_form_submit_button_attr’,’avia_add_submit_attributes_to_cf’, 10, 3);
function avia_add_submit_attributes_to_cf($att, $formID, $form_params){
$att = “onclick=\”_gaq.push([‘_trackPageview’, ‘/VP/XXX/XXX’]);\””;
return $att;
}
– – – – – – – – – – – –If my Google conversion code is :
– – – – – – – – – – – –
<!– Google Code for Waterproofing Enquiry Form Conversion Page –>
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = 881073XXX;
var google_conversion_language = “en”;
var google_conversion_format = “3”;
var google_conversion_color = “ffffff”;
var google_conversion_label = “R416CNzlp2gQ6LiQXXX”;
var google_remarketing_only = false;
/* ]]> */
</script>
<script type=”text/javascript” src=”//www.googleadservices.com/pagead/conversion.js”>
</script>
<noscript>
<div style=”display:inline;”>
</div>
</noscript>
– – – – – – – – – – – –Then what will your example code look like with my google conversion tracking code inserted?
It would be a great feature if this was simply included as an option within the built-in contact form on enfold.
I also do not want the user to go to a thank you page after the submission.
The website is http://www.waterproofingspecialists.com.au
Thanks for the help in advance.
- This topic was modified 8 years, 4 months ago by unitedinnovation.
July 20, 2016 at 10:42 am #662836Hey,
I think the problem is in the google code, gaq.push needs the ga.js library in order to work, refer to:
https://developers.google.com/analytics/devguides/collection/gajs/Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.