Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1059401

    Hi,

    i have a Problem with Google Analytics and the gtag / contact form event.

    I am using the following Analytics Code:
    <!– Global site tag (gtag.js) – Google Analytics –>
    <script async src=”https://www.googletagmanager.com/gtag/js?id=UA-133307688-1″></script&gt;
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());

    gtag(‘config’, ‘UA-133307688-1’, { ‘anonymize_ip’: true });
    </script>

    I am using this in the child 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){
    $gaq = “_gaq.push([‘_trackPageview’, ‘UA-133307688-1’]);”;
    $att = “onclick=\”gtag(‘send’, ‘event’, ‘Submit’, { ‘event_category’ : ‘Contactform’, ‘event_label’ : ‘Form-Submit’, ‘value’: 1 });”;
    return $att;
    }

    And I am using this Event config.
    Link: https://ibb.co/Y0sy3rd

    But its not working, can you help me?

    Thanks, Ronald

    #1060231

    Hey ronaldalexander,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #1060465

    I don’t understand why you can’t help me because you helped everybody else. I saw lot’s of topics with people who asked almost for the same and since i used the code in your documentation and its not working, i thing you could help me solve my problem. I think its not the big deal anyway since you write “require quite some time and customization”.

    Regards, Ronald

    #1061276

    Hi Ronald,

    Here is a thread for you to consider

    Best regards,
    Victoria

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