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

Commit e18ffda

Browse files
author
Robert Kummer
committed
fixed data checks
1 parent 056c08e commit e18ffda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Ipunkt/LaravelAnalytics/Data/Renderer/CampaignRenderer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private function renderName()
5656
private function renderSource()
5757
{
5858
$source = $this->campaign->getSource();
59-
return empty($name) ? '' : "ga('set', 'campaignSource', '{$source}');";
59+
return empty($source) ? '' : "ga('set', 'campaignSource', '{$source}');";
6060
}
6161

6262
/**
@@ -67,7 +67,7 @@ private function renderSource()
6767
private function renderMedium()
6868
{
6969
$medium = $this->campaign->getMedium();
70-
return empty($name) ? '' : "ga('set', 'campaignMedium', '{$medium}');";
70+
return empty($medium) ? '' : "ga('set', 'campaignMedium', '{$medium}');";
7171
}
7272

7373
/**
@@ -78,7 +78,7 @@ private function renderMedium()
7878
private function renderKeyword()
7979
{
8080
$keyword = $this->campaign->getKeyword();
81-
return empty($name) ? '' : "ga('set', 'campaignKeyword', '{$keyword}');";
81+
return empty($keyword) ? '' : "ga('set', 'campaignKeyword', '{$keyword}');";
8282
}
8383

8484
/**
@@ -89,7 +89,7 @@ private function renderKeyword()
8989
private function renderContent()
9090
{
9191
$content = $this->campaign->getContent();
92-
return empty($name) ? '' : "ga('set', 'campaignContent', '{$content}');";
92+
return empty($content) ? '' : "ga('set', 'campaignContent', '{$content}');";
9393
}
9494

9595
/**
@@ -100,6 +100,6 @@ private function renderContent()
100100
private function renderId()
101101
{
102102
$id = $this->campaign->getId();
103-
return empty($name) ? '' : "ga('set', 'campaignId', '{$id}');";
103+
return empty($id) ? '' : "ga('set', 'campaignId', '{$id}');";
104104
}
105105
}

0 commit comments

Comments
 (0)