0
Welcome Guest! Login
0 items Join Now

SOLVED Google Analytics Event Code?

  • SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • You can create a particle override for the analytics atom and alter the code.

      To learn how to override a particle in Gantry 5 please see our documentation here http://docs.gantry.org/gantry5/tutorials/overriding-particle-settings#overriding-particle-source-files .



      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • Thanks, I'll take a look.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • Please let us know the outcome.

      If your issue is now solved, please EDIT your FIRST POST in this thread by adding [SOLVED] at the start of the title and then select the TICK icon. This lets the moderators know that it can be moved to the solved section.

      If you can't edit the first post this will be because it is more than 7 days old, so please reply stating that the topic can be closed and a moderator will do this for you.



      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • I think I would add this to the analytics.yaml file. Would this work? Could something like this be in the next Gantry update?
          ua.event:
            type: input.text
            description: Enter the Google UA event code for analytics (ga('send', 'event', 'Category', 'action', 'Label');)
            label: UA Event
            placeholder: ga('send', 'event', 'Category', 'action', 'Label');
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • That's not going to do anything without changing the Twig file also to use that field you added. Give you want this in the next release of Gantry then why not create a pull request on the Gantry 5 project on github. Gantry 5 is an opensource project. https://github.com/gantry/gantry5/pulls

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • I've submitted the issue. I'm looking forward to getting more involed with the Gantry 5 community. Thanks!
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • issue? There is no issue - I suggested that you created a pull request with the code changes that you believe will benefit others. That is, you maqke the code changes and submit them as a pull request for our developers to review.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • Oh, if you have a suggestion for the Twig file code, I'll give it a try and let you know what happens and make a pull too.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Google Analytics Event Code?

    Posted 7 years 7 months ago
    • You have to look at the twig code yourself and compare that with how you want the resultant code to look and then make the appropriate changes adding in your new field. As there are so many additional parameters that can be added to google analytics I suggest that you do this in a generic way that can be used for other commands too. You will also need to test all of this thoroughly before submitting your pull request to the Gantry 5 project.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.064 seconds