Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikweb
Commits
4457fcaf
Commit
4457fcaf
authored
Aug 29, 2013
by
fred
Browse files
notify piwik of dynamic page changes
parent
e4e8aca0
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/static/js/specifics.js
View file @
4457fcaf
...
@@ -21,6 +21,16 @@ $(function() {
...
@@ -21,6 +21,16 @@ $(function() {
$main
.
empty
().
append
(
new_content
);
$main
.
empty
().
append
(
new_content
);
var
newTitle
=
html
.
match
(
/<title>
(
.*
?)
<
\/
title>/
);
var
newTitle
=
html
.
match
(
/<title>
(
.*
?)
<
\/
title>/
);
if
(
newTitle
){
document
.
title
=
newTitle
[
1
].
trim
().
decodeHTML
();}
if
(
newTitle
){
document
.
title
=
newTitle
[
1
].
trim
().
decodeHTML
();}
if
(
typeof
(
Piwik
)
==
'
object
'
)
{
piwikTracker
=
Piwik
.
getAsyncTracker
();
if
(
typeof
(
piwikTracker
.
trackPageView
)
==
'
function
'
)
{
piwikTracker
.
setDocumentTitle
(
document
.
title
);
piwikTracker
.
setCustomUrl
(
window
.
location
.
href
);
piwikTracker
.
trackPageView
();
}
}
/*
/*
Quite UGLY but needed for styling the whole body with ID
Quite UGLY but needed for styling the whole body with ID
Feel free to correct and find a better way
Feel free to correct and find a better way
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment