Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #596594

    Hi Guys,

    If I add the code below to the field ‘advanced settings’ in contact form 7, form submissions are tracked in analytics. Is there a way to add this code to an enfold contact form? I’d prefer to add it to all enfold contact forms at once, so that every enfold contact form is set as a goal.

    Kind regards.

    #598070

    Hi lucasvrooij!

    Please refer to this post – http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/

    Best regards,
    Yigit

    #604753

    Hi Yigit,

    Thanks for the reply.

    I’m using yoast analytics and this was my best shot at getting a pageview sent for /doel/offerte/, unfortunately it’s not working yet.

    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=\"__gaTracker('send', 'pageview', '/doel/offerte/');";
      return $att;
    }

    I’ve also tried this in analytics field but no luck

    $('.avia_ajax_form .button').on('click', function() {
         __gaTracker('send', 'pageview', '/doel/offerte/');
    });
    #604988

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Thanks,
    Rikard

    #605283

    See below

    #606137

    Hey!

    You are using an old version of the theme, so please upgrade to Enfold 3.5.1 and let us know if you still need help afterwards.

    Also upgrade your WordPress.

    Cheers!
    Andy

    #610616

    Hi Andy,

    Thanks for the reply.

    I have updated the theme to the newest version but it’s still not working. I added the code below to force a virtual pagevisit to /doel/offerte but it’s still not working. Goal tracking is essential for a succeslfull website, so this would be a nice feature in new enfold versions:). In the meantime, i’d be great if you can help me get the right code.

    `
    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=\”__gaTracker(‘send’, ‘pageview’, ‘/doel/offerte/’);”;
    return $att;
    }

    #611668

    Hi!

    This is a working goal tracker snippet: https://kriesi.at/support/topic/tracking-contact-form/#post-565219

    For more info regarding goals creation, please refer to this link: https://support.google.com/analytics/answer/1032415#create_or_edit_goals

    Regards,
    Ismael

    #615484

    Hi Ismael,

    Thanks for the reply, but I still didn’t get it working, i’m using yoast analytics plugin.

    I added goal like this:

    And this code to the bottom of functions.php
    ‘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=\”var _gaq = _gaq || [];_gaq.push([‘_offerte’, ‘offerte’, ‘offerte’, ‘offerte’, 1, true]);\””;
    return $att;
    }’

    Kind regards!

    #617155

    Hey!

    It only counts actions per unique sessions (use another computer or network) and it may take a few hours before you receive any results. Where is the contact form located?

    UPDATE: The code should be:

    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=\"var _gaq = _gaq || [];_gaq.push(['_trackEvent', 'offerte', 'offerte', 'offerte', offerte, true]);\"";
    	return $att;
    }
    

    Cheers!
    Ismael

    #618211

    Hi Ismael,

    It’s also possible to monitor the goals under the realtime section in analytics.

    I added the code you sent to a portfolio item but still no luck. Please take into account that i’m using the yoast analytics plug-in to connect analytics to the site. If you want to, i can provide you with ftp of the live site + make you editor of the analytics for this site.

    Kind regards.

    #620555

    Hi!

    I’m sorry but I’m not familiar with yoast analytics. The snippet we provided will only work for the default google analytics goals. Please contact the plugin author for more info.

    Cheers!
    Ismael

    #620801

    Hi Ismael,

    Thanks for the reply again.

    I switched to the default analytics (add code in theme options) but it’s still not working.

    Kind regards.

    #620850

    Hi!

    There are several steps you need to follow to add google tracking code one of which includes verify your domain name. I hope you have performed these steps only then it will work for you.

    please check this link and follow all the steps

    https://support.google.com/analytics/answer/1008080?hl=en

    https://support.google.com/analytics/answer/6280771

    After all the necessary steps are performed you can add the tracking code in Enfold >Google Analytics Tracking Code

    Regards,
    Vinay

    #622490

    Hi Vinny,

    Like i said earlier in this post, i know how analytics works and how to add a goal, also the tracking code is already added and working. I added the goal with settings like below, and Ismael provided me with a piece of code to go with it, unfortunately the code doesn’t work.

    Kind regards.

    #624317

    Hi,

    Please post the login details for the google webmaster and the link to the contact page. We will try to set up a goal.

    Best regards,
    Ismael

    #626074

    Hi Ismael,

    See below for the google account, please let me know if you need something else.

    #628062

    Hi,

    There are 2 contact page there. Which one are you using? I can see that you changed the onclick attribute of the button. Is this working? Unfortunately, I can’t access the gmail account because it requires authentication or the recovery email address.

    Confirm the recovery email you provided in your security settings: luc••••••••@gmail.com

    Best regards,
    Ismael

    #630903

    Hi Ismael,

    You can use the goal offerte2 to setup the goal.

    The goal ‘contactaanvraag’ is for the contact form on the contact page, this is working properly with contact form 7 using the code on_sent_ok: “ga(‘send’, ‘pageview’, ‘/doel/contact/’);”.

    Recovery mail is below.

    Kind regards.

    #631883

    Hi,

    I was able to login to the webmaster dashboard but there is no registered site there. How did you manage to create a goal without verifying a site that you owned? https://support.google.com/webmasters/answer/35179?hl=en

    Best regards,
    Ismael

    #682674

    Hey,

    I’ve tried to set up the same. This is the code I’ve added to the functions.php of the Child-Theme:

    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=\"var _gaq = _gaq || [];_gaq.push(['_trackEvent', 'request', 'request', 'request', 1, true]);\"";
    	return $att;
    }

    The Goal is set up for the property as follows:

    Category (equals): request
    Action (equals): request
    Label (equals): request
    Value (equals): 1

    And this the Tracking Code added via the Google Services Analytics Tab in the Theme’s Options:

    <script>
    	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    	})(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker');
    
    	__gaTracker('create', 'UA-12345678-1', 'auto');
    	__gaTracker('set', 'forceSSL', true);
    	__gaTracker('set', 'anonymizeIp', true);
    	__gaTracker('require', 'displayfeatures');
    	__gaTracker('require', 'linkid', 'linkid.js');
    	__gaTracker('send','pageview');
        
    </script>

    1. Should it work this way? I am confused as for the value you posted “offerte” above also and not the value set as a goal. Furthermore, is “equals” alright for the value or should it be “greater than”? Or is the value not needed in this case and I should replace the “1” in the functions.php with “request” also?

    2. Will this also deliver the keyword over which the user came to the website, if the target URL on the Ad provides this information?

    Thanks a bunch,
    eC

    #684389

    Hi,

    1.) It should be “equal” the value.

    2.) I’m not sure what you meant by that but the goal will be triggered once the user click the contact form’s submit button.

    Best regards,
    Ismael

Viewing 22 posts - 1 through 22 (of 22 total)
  • You must be logged in to reply to this topic.