Skip to content

Commit

Permalink
removed duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
joernroeder committed Nov 30, 2017
1 parent 20c9caf commit 8fa0e7e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,7 @@ var PiwikTracker = function(opts) {
var alreadyInitialized = piwikIsAlreadyInitialized();

if (!alreadyInitialized) {
if (opts.url.indexOf('http://') !== -1 || opts.url.indexOf('https://') !== -1) {
var u = opts.url + '/';
} else {
var u = (('https:' == document.location.protocol) ? 'https://' + opts.url + '/' : 'http://' + opts.url + '/');
}
var u = getBaseUrl();

push(['setSiteId', opts.siteId]);
push(['setTrackerUrl', u + opts.serverTrackerName]);
Expand Down

0 comments on commit 8fa0e7e

Please sign in to comment.