Support » Plugin: Google Analytics Germanized (GDPR / DSGVO) » Where to place config codes

  • Resolved Ate Up With Motor

    (@ate-up-with-motor)


    Hi,

    I am using Google Analytics Germanized with gtag.js, which I don’t understand too well.

    I want to make sure the duration of the _ga cookie is only one year. The Google Analytics developer page for cookies says to add the following config code:

    gtag('config', 'GA_TRACKING_ID', {
      'cookie_expires': 31536000  // one year (in seconds)
    });

    In Google Analytics Germanized, will that code work if I paste it into the Code (head) section of the Tracking Codes field in the plugin settings? Or does it need to go somewhere else?

    Thanks!

    • This topic was modified 1 year, 2 months ago by  Ate Up With Motor. Reason: fixed improperly placed close tag

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ate Up With Motor

    (@ate-up-with-motor)

    Ahh, if I put it in Custom Code, that works.

    Ate Up With Motor

    (@ate-up-with-motor)

    Oops, I spoke too soon, that does not work properly.

    I need to add the following parameter to gtag:

    "cookie-expires":31536000

    How can I add this parameter in Google Analytics Germanized?

    Ate Up With Motor

    (@ate-up-with-motor)

    Is there really no way to add custom parameters? I’ve tried placing the code in each of the custom fields and none seem to work.

    Plugin Author Sascha Rudolph

    (@sascharudolph)

    Hey Ate,

    unfortunately not now. The only way that we can offer is you can write a support ticket at https://www.pascal-bajorat.com/support/ and we can check your site by ourself.

    Thanks
    Sascha

    Ate Up With Motor

    (@ate-up-with-motor)

    I don’t read much German, but it looks like that charges for support requests?

    If the ability to add custom gtag codes isn’t currently part of the plugin, may I suggest adding that feature in future versions?

    Other Google Analytics custom code is added in the same manner as the anonymization code (in fact, the developer documentation suggests that both the anonymization code and the cookie expiry codes can be added as a comma-separate list of parameters). So, the plugin is already set up to insert the codes in the proper way, and having an advanced option to insert additional codes would be very helpful.

    Thanks!

    Plugin Author Sascha Rudolph

    (@sascharudolph)

    We set this on our todo list for the next update. Thanks for the suggestion!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Where to place config codes’ is closed to new replies.