Branch Coverage

blib/lib/WWW/ClickSource.pm
Criterion Covered Total %
branch 36 50 72.0


line true false branch
104 0 1 unless ($request)
110 0 1 if ($options{'keep_request'})
131 19 5 if (my $params = $request->{'params'})
132 0 14 if ($params->{'utm_source'} or $params->{'utm_campaign'} or $params->{'utm_medium'})
139 0 5 unless ($click_info{'source'})
140 0 0 if ($request->{'referer'})
141 0 0 if ($request->{'referer'}->scheme =~ /https?/) { }
0 0 elsif ($request->{'referer'}->scheme eq 'android-app') { }
151 4 1 if ($click_info{'medium'} =~ /cpc|cpm|facebook_ads/) { }
1 0 elsif ($request->{'referer'}) { }
162 4 15 if ($params->{'gclid'})
163 3 1 if ($request->{'referer'}) { }
164 2 1 if ($request->{'referer'}->scheme =~ /https?/) { }
1 0 elsif ($request->{'referer'}->scheme eq 'android-app') { }
165 2 0 if ($request->{'referer'}->host =~ /(?:google\.(?:com?\.)?\w{2,3}|googleadservices\.com|googleads\.\w+\.doubleclick\.net)$/)
204 15 9 unless ($click_info{'medium'})
205 14 1 if ($request->{'referer'}) { }
207 13 1 if ($request->{'referer'}->scheme =~ /https?/) { }
1 0 elsif ($request->{'referer'}->scheme eq 'android-app') { }
211 2 11 if ($referer_base_url =~ m[(?:google\.(?:com?\.)?\w{2,3}|googleadservices\.com).*?/aclk]) { }
221 1 10 if ($request->{'referer'}->host eq $request->{'host'}) { }
259 1 14 if ($click_info{'source'} and $click_info{'source'} =~ /l\.facebook\.com/) { }
2 13 elsif ($click_info{'source'} and $click_info{'source'} =~ /(?:(?:m|www)\.)?(facebook|twitter|linkedin|plus\.google)\.(?:com?\.)?\w{2,3}/) { }
269 7 5 if ($click_info{'source'} and $click_info{'category'} eq 'referer' and $click_info{'source'} =~ /(?:www|search\.)?(google|yahoo|bing|yandex|baidu|aol|ask|duckduckgo)\.(?:com?\.)?\w{2,3}$/ || $click_info{'source'} =~ /webcache\.(google)usercontent\.com/)
285 23 1 if wantarray