Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PZ
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
PZ
Commits
1b14ba08
Verified
Commit
1b14ba08
authored
2 years ago
by
Andrej Ramašeuski
Browse files
Options
Downloads
Patches
Plain Diff
Cistka trackeru google
parent
001210c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/PZ/Helpers/Core.pm
+13
-1
13 additions, 1 deletion
lib/PZ/Helpers/Core.pm
with
13 additions
and
1 deletion
lib/PZ/Helpers/Core.pm
+
13
−
1
View file @
1b14ba08
...
@@ -5,6 +5,16 @@ use base 'Mojolicious::Plugin';
...
@@ -5,6 +5,16 @@ use base 'Mojolicious::Plugin';
use
YAML
;
use
YAML
;
use
Mojo::
URL
;
use
Mojo::
URL
;
use
constant
TRACKERS
=>
[
qw(
fbclid
gclid
utm_medium
utm_source
utm_campaign
utm_content
utm_term
)
];
sub
register
{
sub
register
{
my
(
$class
,
$self
)
=
@_
;
my
(
$class
,
$self
)
=
@_
;
...
@@ -92,8 +102,10 @@ sub register {
...
@@ -92,8 +102,10 @@ sub register {
my
$c
=
shift
;
my
$c
=
shift
;
my
$url
=
Mojo::
URL
->
new
(
shift
);
my
$url
=
Mojo::
URL
->
new
(
shift
);
$url
->
query
({
fbclid
=>
undef
});
foreach
my
$tracker
(
@
{
TRACKERS
()
})
{
$url
->
query
({
$tracker
=>
undef
});
}
return
$url
->
to_string
;
return
$url
->
to_string
;
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment