You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.
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
Another thing I want to add is since setCustom method accepts array of dimenntions I tried to set the page view to false by doing Analytics::setCustom(['pageview' => false]); or Analytics::setCustom(['send_page_view' => false]); but that still not working and the GA is still tracking the page view.
Please help me figure out a way to do this. Or if I'm missing anything please point that out to me.
Thanks.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've been using this library to track page views and events. The
auto_track
configuration I've kept totrue
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 tofalse
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 tofalse
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?The text was updated successfully, but these errors were encountered: