mautic-wordpress
mautic-wordpress copied to clipboard
Allow to disable global website tracking in plugin settings ?
Actually, when the plugin is installed, user are tracked on all the pages.
Maybe we can add a new settings to disable the global tracker and a new shortcode to add it only on a specific page.
I think, adding a third option to the "Tracking script location" setting is the right place to do that.
What do you think about ?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Thinking about this, my feeling is that tracking on all pages is just fine. One would later filter the tracking results on the backend side. It would be far easier to adapt a filter on the backend, than changing all concerned pages on the frontend. Not only easier, but also more flexible: I want tracking on page Christian from users not active since 01.01.0000 - that's not binary "tracking yes/no". We don't track for the data, we track for the actions we might take depending on the data.
I think there're a few ways to deal with this.
For a site that only wants to track a couple of pages, a shortcode would be useful.
It could also be a checkbox in the post/page edit screen to either enable or disable the tracker depending on a default option in the plugin settings.
The plugin settings could have an option something similar to ACF where you can choose the post types/page templates/post templates etc for it to show or not show on.
Or there could be something simpler like supercache with a few checkboxes to disable the tracking on those types of pages or a text area where you can add some strings to match urls.
Or just a field to either add some page id's or a select to pick some.
SHosometimes if they are added to a lot of pages and you need t remove them. I usually end you searching and replacing in the database.
Have a blacklist/whitelist site wide default option on the primary WP-Mautic page and a selector box to blacklist/whitelist each individual page/post.
Hello, thank you all for your answers 😄.
I think that we'll handle that feature in simple steps :
- Allow the user to disable the generic tracking using a setting,
- Add a shortcode or a metabox to add the tracker on a page (with a check to never double add it depending settings). => Shortcode or meta what's your preference ?
With these two new things, we can handle most of the cases. Then we can choose to add a more complicated setting section which allow to choose content type, page layout, post ids to enable or block tracker on.
On this last thing, I think we can add it in a second time by updating the enable / disable setting to a combobox with : "Enabled", "Disabled", "Enabling with rules".
If the user choose the last choice, a new setting section will appear which let him applying custom rules. Since it's a really more complicated thing to implement we must put effort on the first step before.
Though ?
I would say meta over shortcode as you don't have to edit a bunch of posts if you want to remove it in the future. Plus, the code doesn't really want to go in the article content anyway so it's just really telling the plugin that it should output the tracking code in the place specified in the plugin settings.