Dynamically switch visibility setting

Created on 15 October 2012, about 12 years ago
Updated 6 July 2023, over 1 year ago

How could I dynamically change the visibility setting for the current page.

I think this calls for a drupal_alter hook in _googleanalytics_visibility_pages() function. It should be as easy as adding drupal_alter('googleanalitycs_visibility_page', $page_match); just before returning the $preg_match result.

One could implement hook_googleanalitycs_visibility_page_alter($display) and change to his needs the option to display or not the code on the current page. I'll prepare a patch for this.

What do you say?

✨ Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania Alex Savin

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    With the sunset of legacy google analytics, the 8.x-2.x module is now unsupported. If this is still an issue with the 4.x version, please file a new issue in the queue.

Production build 0.71.5 2024