Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    SOLVED Google Analytics and event tracking code

    How-to, Tutorials
    2
    4
    334
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nazem SAMAD
      Nazem SAMAD last edited by

      Dear AppDrag community,

      I need to track some event on a website for one of my customer but I am not able to find where to add the information.

      For example if some register to the newsletter form, the event is registered as :

      Category : prospect
      Action : inscrire
      Label : newsletter
      Value : 1

      I've seen that I should add this code to add on my website :

      gtag('event', <action>, {
      'event_category': <category>,
      'event_label': <label>,
      'value': <value>
      });

      Which in my case will be :

      gtag('event', 'inscrire', {
      'event_category': 'prospect',
      'event_label': 'newsletter',
      'value': '1'
      });

      Where do I add this information in order to track my event ?

      Waiting your help,

      Best regards,

      Joseph Benguira 1 Reply Last reply Reply Quote 0
      • Joseph Benguira
        Joseph Benguira @Nazem SAMAD last edited by

        Hey @nazem-samad, in the contact form settings, there is an option to add html code after the form is submitted, there you could add your script wrapped in script tags like this:

        <script>
        gtag('event', 'inscrire', {
        'event_category': 'prospect',
        'event_label': 'newsletter',
        'value': '1'
        });
        </script>
        
        1 Reply Last reply Reply Quote 0
        • Nazem SAMAD
          Nazem SAMAD last edited by

          Dear @Joseph-Benguira , thank you for your reply. I assume that if I need to track a link or a click on an element, I need to go to "Actions" then "Javascript" and add my code there.

          Morevover, I did add the script on my website but my event is not reported on my Google Analytics account. The website is well linked to the account because I can see the traffic.

          1 Reply Last reply Reply Quote 0
          • Nazem SAMAD
            Nazem SAMAD last edited by

            Well, I was too impatient everything is just fine with what you told me ! Thanks again for your precious help !

            1 Reply Last reply Reply Quote 1
            • First post
              Last post