Skip to content

Commit 5e9bf7a

Browse files
authored
Merge pull request #34 from mauricerenck/develop
added: matomo - track rss page views
2 parents 3b1c464 + f3404e8 commit 5e9bf7a

File tree

6 files changed

+71
-56
lines changed

6 files changed

+71
-56
lines changed

blueprints/pages/podcasterfeed.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,17 @@ tabs:
339339
width: 1/4
340340
when:
341341
podcasterMatomoFeedEnabled: yes
342+
podcasterMatomoFeedPage:
343+
label: Track Page
344+
help: Will create a page view when feed is viewed
345+
type: toggle
346+
default: no
347+
text:
348+
- disabled
349+
- enabled
350+
width: 1/4
351+
when:
352+
podcasterMatomoFeedEnabled: yes
342353
podcasterMatomoFeedGoalId:
343354
label: Goal Id
344355
type: text

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mauricerenck/podcaster",
3-
"version": "1.2.2",
4-
"description": "A podcast plugin for Kirby 3",
3+
"version": "1.2.3",
4+
"description": "A Kirby Podcast Plugin",
55
"type": "kirby-plugin",
66
"license": "MIT",
77
"authors": [

composer.lock

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
$matomo->setUrl($feed->url());
105105
$matomo->setIp($_SERVER['REMOTE_ADDR']);
106106

107+
if ($feed->podcasterMatomoFeedPage()->isNotEmpty() && $feed->podcasterMatomoFeedPage()->isTrue()) {
108+
$matomo->doTrackPageView($feed->podcasterTitle());
109+
}
110+
107111
if ($feed->podcasterMatomoFeedGoalId()->isNotEmpty()) {
108112
$matomo->doTrackGoal($feed->podcasterMatomoFeedGoalId(), 1);
109113
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "podcaster",
3-
"version": "1.2.2",
4-
"description": "Theme",
3+
"version": "1.2.3",
4+
"description": "A Kirby Podcast Plugin",
55
"main": "index.js",
66
"author": "Maurice Renck",
77
"scripts": {

utils/PodcasterWizard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function getPageSlug($link, $title)
2020
if (is_null($link)) {
2121
return Str::slug($title);
2222
}
23-
23+
// TODO use Url::path($target); ?
2424
return array_slice(explode('/', rtrim($link, '/')), -1)[0];
2525
}
2626

0 commit comments

Comments
 (0)