Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

issue using setCustom method #52

@imrealashu

Description

@imrealashu

I've been using this library to track page views and events. The auto_track configuration I've kept to true to auto track all the pageviews. However, I've been struggling to disable one specific pageview. So basically after successful payment the service redirecting to a certain page on my website. Now, I do not want to track the page because it is messing up with my analytics data as the source being payment service website, as well as the URL contains some paymenentID and other pieces of information which I do not want that to be tracked.
I simply cannot disable the auto-tracking as I am tracking one event as well on that page.
I came across with setCustom method which I thought could use to set the page views to false and stop tracking the page view only but keep the event tracking on.
I used that method something like this

Analytics::setCustom('send_page_view', false);

But, that doesn't help.
I tried to debug that on the source and found out that https://github.com/ipunkt/laravel-analytics/blob/master/src/Ipunkt/LaravelAnalytics/Providers/GoogleAnalytics.php#L632 in this method the $value seems to be empty even if I set that on the controller.
I checked the page source as well to see the produced script but that was also empty like this ga('set', 'send_page_view', '');

I set the auto_track from the configuration to false and tried to setCustom to not track pageview but that also didn't work. Value seems to be empty.

What would be simple way to disable page tracking just for one page while keeping the auto_track on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions