Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-10-19 01:48:41 +0300
committerGitHub <noreply@github.com>2020-10-19 01:48:41 +0300
commite2666f6310f779e3dd66c27df53deb961321bdc5 (patch)
treeb29fb9b113d66bc12c82aa45a21824b60468e851 /tests
parentedf169d55e8d2291cdecf67125240acac1439d2d (diff)
Ignore tracking requests for disabled plugins (#16570)
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Integration/Tracker/ActionTest.php39
-rw-r--r--tests/javascript/index.php70
2 files changed, 73 insertions, 36 deletions
diff --git a/tests/PHPUnit/Integration/Tracker/ActionTest.php b/tests/PHPUnit/Integration/Tracker/ActionTest.php
index 69e60a6e08..c6579b7895 100644
--- a/tests/PHPUnit/Integration/Tracker/ActionTest.php
+++ b/tests/PHPUnit/Integration/Tracker/ActionTest.php
@@ -13,6 +13,7 @@ use Piwik\Plugins\SitesManager\API;
use Piwik\Tests\Framework\Fixture;
use Piwik\Tests\Framework\Mock\FakeAccess;
use Piwik\Tracker\Action;
+use Piwik\Tracker\ActionPageview;
use Piwik\Tracker\PageUrl;
use Piwik\Tracker\Request;
use Piwik\Plugin\Manager as PluginManager;
@@ -35,7 +36,7 @@ class ActionTest extends IntegrationTestCase
$section['campaign_keyword_var_name'] = 'piwik_kwd,matomo_kwd,utm_term,test_piwik_kwd';
Config::getInstance()->Tracker = $section;
- PluginManager::getInstance()->loadPlugins(array('SitesManager'));
+ PluginManager::getInstance()->loadPlugins(array('Actions', 'SitesManager'));
Fixture::loadAllTranslations();
}
@@ -52,6 +53,39 @@ class ActionTest extends IntegrationTestCase
FakeAccess::$superUser = true;
}
+ public function test_isCustomActionRequest()
+ {
+ $request = new Request(array('ca' => '1'));
+ $this->assertTrue(Action::isCustomActionRequest($request));
+
+ $request = new Request(array('ca' => '0'));
+ $this->assertFalse(Action::isCustomActionRequest($request));
+
+ $request = new Request(array());
+ $this->assertFalse(Action::isCustomActionRequest($request));
+ }
+
+ public function test_factory_notDefaultsToPageViewWhenCustomPluginRequest()
+ {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Request was meant for a plugin which is no longer activated. Request needs to be ignored.');
+ $this->setUpRootAccess();
+ $idSite = API::getInstance()->addSite("site1", array('http://example.org'));
+ $request = new Request(array('ca' => '1', 'idsite' => $idSite));
+
+ Action::factory($request);
+ }
+
+ public function test_factory_defaultsToPageviewWhenNotCustomPluginRequest()
+ {
+ $this->setUpRootAccess();
+ $idSite = API::getInstance()->addSite("site1", array('http://example.org'));
+ $request = new Request(array('idsite' => $idSite));
+
+ $action = Action::factory($request);
+ $this->assertTrue($action instanceof ActionPageview);
+ }
+
public function getTestUrls()
{
$campaignNameParam = 'test_campaign_name';
@@ -383,7 +417,6 @@ class ActionTest extends IntegrationTestCase
*/
public function testExtractUrlAndActionNameFromRequest($request, $expected)
{
- PluginManager::getInstance()->loadPlugins(array('Actions', 'SitesManager'));
$this->setUpRootAccess();
$idSite = API::getInstance()->addSite("site1", array('http://example.org'));
$request['idsite'] = $idSite;
@@ -397,7 +430,7 @@ class ActionTest extends IntegrationTestCase
'type' => $action->getActionType(),
);
- $this->assertEquals($processed, $expected);
+ $this->assertEquals($expected, $processed);
}
public function provideContainerConfig()
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index c699107c1e..ca1fab7222 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -1311,11 +1311,15 @@ function PiwikTest() {
}
function assertImpressionRequestParams(name, piece, target, expected, message) {
- strictEqual(content.buildImpressionRequestParams(name, piece, target), expected, message);
+ strictEqual(content.buildImpressionRequestParams(name, piece, target), expected + '&ca=1', message);
}
function assertInteractionRequestParams(interaction, name, piece, target, expected, message) {
- strictEqual(content.buildInteractionRequestParams(interaction, name, piece, target), expected, message);
+ var actual = content.buildInteractionRequestParams(interaction, name, piece, target);
+ if (actual) {
+ expected = expected + '&ca=1';
+ }
+ strictEqual(actual, expected, message);
}
function assertShouldIgnoreInteraction(id, message) {
@@ -1822,7 +1826,7 @@ function PiwikTest() {
strictEqual(actual.indexOf(expectedStartsWith), 0, message + " " + actual + ' should start with ' + expectedStartsWith);
- var expectedString = '&idsite=1&rec=1';
+ var expectedString = '&ca=1&idsite=1&rec=1';
strictEqual(actual.indexOf(expectedString), expectedStartsWith.length, 'did not find ' + expectedString + ' in ' + actual);
// make sure it contains all those other tracking stuff directly afterwards so we can assume it did append
// the other request stuff and we also make sure to compare the whole custom string as we check from
@@ -1905,25 +1909,25 @@ function PiwikTest() {
strictEqual(actual, undefined, 'appendContentInteractionToRequestIfPossible, the content block node was clicked but it is not the target');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex104'));
- strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg'), 'appendContentInteractionToRequestIfPossible, the actual target node was clicked');
+ strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&ca=1', 'appendContentInteractionToRequestIfPossible, the actual target node was clicked');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex104'), 'clicki');
- strictEqual(actual, 'c_i=clicki&c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg'), 'appendContentInteractionToRequestIfPossible, with interaction');
+ strictEqual(actual, 'c_i=clicki&c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&ca=1', 'appendContentInteractionToRequestIfPossible, with interaction');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex104_inner'));
- strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg'), 'appendContentInteractionToRequestIfPossible, block node is target node and any node within it was clicked which is good, we build a request');
+ strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&ca=1', 'appendContentInteractionToRequestIfPossible, block node is target node and any node within it was clicked which is good, we build a request');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex104_inner'));
- strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg'), 'appendContentInteractionToRequestIfPossible, a node within a target node was clicked which is googd');
+ strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&ca=1', 'appendContentInteractionToRequestIfPossible, a node within a target node was clicked which is googd');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex105_target'));
- strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&c_t=http%3A%2F%2Fwww.example.com', 'appendContentInteractionToRequestIfPossible, target node was clicked which is good');
+ strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&c_t=http%3A%2F%2Fwww.example.com&ca=1', 'appendContentInteractionToRequestIfPossible, target node was clicked which is good');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex105_withinTarget'));
- strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&c_t=http%3A%2F%2Fwww.example.com', 'appendContentInteractionToRequestIfPossible, a node within target node was clicked which is googd');
+ strictEqual(actual, 'c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&c_t=http%3A%2F%2Fwww.example.com&ca=1', 'appendContentInteractionToRequestIfPossible, a node within target node was clicked which is googd');
actual = tracker.appendContentInteractionToRequestIfPossible(_s('#ex104_inner'), 'click', 'fallbacktarget');
- strictEqual(actual, 'c_i=click&c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&c_t=fallbacktarget', 'appendContentInteractionToRequestIfPossible, if no target found we can specify a default target');
+ strictEqual(actual, 'c_i=click&c_n=' + toEncodedAbsolutePath('img.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img.jpg') + '&c_t=fallbacktarget&ca=1', 'appendContentInteractionToRequestIfPossible, if no target found we can specify a default target');
@@ -4142,9 +4146,9 @@ if ($mysql) {
ok( /search=search%20Keyword&idsite=1/.test(results), "site search, no cat, no results count ");
// Test events
- ok( /(e_c=Event%20Category&e_a=Event%20Action&idsite=1).*(&e_cvar=%7B%221%22%3A%5B%22cvarEventName%22%2C%22cvarEventValue%22%5D%2C%222%22%3A%5B%22cookiename2EVENT%22%2C%22cookievalue2EVENT%22%5D%7D)/.test(results), "event Category + Action + Custom Variable");
- ok( /e_c=Event%20Category2&e_a=Event%20Action2&e_n=Event%20Name2&idsite=1/.test(results), "event Category + Action + Name");
- ok( /e_c=Event%20Category3&e_a=Event%20Action3&e_n=Event%20Name3&e_v=3.333&idsite=1/.test(results), "event Category + Action + Name + Value");
+ ok( /(e_c=Event%20Category&e_a=Event%20Action&ca=1&idsite=1).*(&e_cvar=%7B%221%22%3A%5B%22cvarEventName%22%2C%22cvarEventValue%22%5D%2C%222%22%3A%5B%22cookiename2EVENT%22%2C%22cookievalue2EVENT%22%5D%7D)/.test(results), "event Category + Action + Custom Variable");
+ ok( /e_c=Event%20Category2&e_a=Event%20Action2&e_n=Event%20Name2&ca=1&idsite=1/.test(results), "event Category + Action + Name");
+ ok( /e_c=Event%20Category3&e_a=Event%20Action3&e_n=Event%20Name3&e_v=3.333&ca=1&idsite=1/.test(results), "event Category + Action + Name + Value");
// ecommerce view
ok( /(EcommerceView).*(&_pkc=CATEGORY%20HERE&_pks=SKU&_pkn=NAME)/.test(results), "ecommerce view");
@@ -4153,13 +4157,13 @@ if ($mysql) {
ok( /(MultipleCategories).*(&_pkc=%5B%22CATEGORY1%22%2C%22CATEGORY2%22%5D&_pks=SKUMultiple&_pkn=)/.test(results), "ecommerce view multiple categories");
// Ecommerce order
- ok( /idgoal=0&ec_id=ORDER%20ID%20YES&revenue=666.66&ec_st=333&ec_tx=222&ec_sh=111&ec_dt=1&ec_items=%5B%5B%22SKU%20PRODUCT%22%2C%22random%22%2C%22random%20PRODUCT%20CATEGORY%22%2C11.1111%2C2%5D%2C%5B%22SKU%20ONLY%20SKU%22%2C%22%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%20NAME%22%2C%22PRODUCT%20NAME%202%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20NO%20PRICE%20NO%20QUANTITY%22%2C%22PRODUCT%20NAME%203%22%2C%22CATEGORY%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%22%2C%22%22%2C%22%22%2C0%2C1%5D%5D/.test( results ), "logEcommerceOrder() with items" );
+ ok( /idgoal=0&ec_id=ORDER%20ID%20YES&revenue=666.66&ec_st=333&ec_tx=222&ec_sh=111&ec_dt=1&ec_items=%5B%5B%22SKU%20PRODUCT%22%2C%22random%22%2C%22random%20PRODUCT%20CATEGORY%22%2C11.1111%2C2%5D%2C%5B%22SKU%20ONLY%20SKU%22%2C%22%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%20NAME%22%2C%22PRODUCT%20NAME%202%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20NO%20PRICE%20NO%20QUANTITY%22%2C%22PRODUCT%20NAME%203%22%2C%22CATEGORY%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%22%2C%22%22%2C%22%22%2C0%2C1%5D%5D&ca=1/.test( results ), "logEcommerceOrder() with items" );
// Cart update
- ok( /idgoal=0&revenue=555.55&ec_items=%5B%5B%22SKU%20PRODUCT%22%2C%22random%22%2C%22random%20PRODUCT%20CATEGORY%22%2C11.1111%2C2%5D%2C%5B%22SKU%20ONLY%20SKU%22%2C%22%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%20NAME%22%2C%22PRODUCT%20NAME%202%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20NO%20PRICE%20NO%20QUANTITY%22%2C%22PRODUCT%20NAME%203%22%2C%22CATEGORY%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%22%2C%22%22%2C%22%22%2C0%2C1%5D%5D/.test( results ), "logEcommerceCartUpdate() with items" );
+ ok( /idgoal=0&revenue=555.55&ec_items=%5B%5B%22SKU%20PRODUCT%22%2C%22random%22%2C%22random%20PRODUCT%20CATEGORY%22%2C11.1111%2C2%5D%2C%5B%22SKU%20ONLY%20SKU%22%2C%22%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%20NAME%22%2C%22PRODUCT%20NAME%202%22%2C%22%22%2C0%2C1%5D%2C%5B%22SKU%20NO%20PRICE%20NO%20QUANTITY%22%2C%22PRODUCT%20NAME%203%22%2C%22CATEGORY%22%2C0%2C1%5D%2C%5B%22SKU%20ONLY%22%2C%22%22%2C%22%22%2C0%2C1%5D%5D&ca=1/.test( results ), "logEcommerceCartUpdate() with items" );
// Ecommerce order recorded twice, but each order empties the cart/list of items, so this order is empty of items
- ok( /idgoal=0&ec_id=ORDER%20WITHOUT%20ANY%20ITEM&revenue=777&ec_st=444&ec_tx=222&ec_sh=111&ec_dt=1&ec_items=%5B%5D/.test( results ), "logEcommerceOrder() called twice, second time has no item" );
+ ok( /idgoal=0&ec_id=ORDER%20WITHOUT%20ANY%20ITEM&revenue=777&ec_st=444&ec_tx=222&ec_sh=111&ec_dt=1&ec_items=%5B%5D&ca=1/.test( results ), "logEcommerceOrder() called twice, second time has no item" );
// parameters inserted by plugin hooks
ok( /testlog/.test( results ), "plugin hook log" );
@@ -4173,8 +4177,8 @@ if ($mysql) {
ok( /&uid=userid%40mydomain.org/.test( results ), "setUserId(userId) function");
// Testing the JavaScript Error Tracking
- ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D34343%3A44%3A12&e_n=Uncaught%20Error%3A%20The%20message&idsite=1/.test( results ), "enableJSErrorTracking() function with predefined onerror event");
- ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D3kfkf%3A45&e_n=Second%20Error%3A%20With%20less%20data&idsite=1/.test( results ), "enableJSErrorTracking() function without predefined onerror event and less parameters");
+ ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D34343%3A44%3A12&e_n=Uncaught%20Error%3A%20The%20message&ca=1&idsite=1/.test( results ), "enableJSErrorTracking() function with predefined onerror event");
+ ok( /e_c=JavaScript%20Errors&e_a=http%3A%2F%2Fpiwik.org%2Fpath%2Fto%2Ffile.js%3Fcb%3D3kfkf%3A45&e_n=Second%20Error%3A%20With%20less%20data&ca=1&idsite=1/.test( results ), "enableJSErrorTracking() function without predefined onerror event and less parameters");
ok( /matomo.php\?action_name=twoTrackers&idsite=1&/.test( results ), "addTracker() trackPageView() sends request to both Piwik instances");
ok( /matomo.php\?action_name=twoTrackers&idsite=13&/.test( results ), "addTracker() trackPageView() sends request to both Piwik instances");
@@ -4477,13 +4481,13 @@ if ($mysql) {
var trackingRequests = [
null,
- 'c_n=' + toEncodedAbsolutePath('img1-en.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img1-en.jpg'),
- 'c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com',
- 'c_n=' + toEncodedAbsolutePath('img3-en.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img3-en.jpg') + '&c_t=http%3A%2F%2Fimg3.example.com',
- 'c_n=My%20content%204&c_p=My%20content%204&c_t=http%3A%2F%2Fimg4.example.com',
- 'c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fanylink5',
- 'c_n=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_p=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_t=http%3A%2F%2Fimg6.example.com',
- 'c_n=My%20Ad%207&c_p=Unknown&c_t=http%3A%2F%2Fimg7.example.com'
+ 'c_n=' + toEncodedAbsolutePath('img1-en.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img1-en.jpg') + '&ca=1',
+ 'c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com&ca=1',
+ 'c_n=' + toEncodedAbsolutePath('img3-en.jpg') + '&c_p=' + toEncodedAbsoluteUrl('img3-en.jpg') + '&c_t=http%3A%2F%2Fimg3.example.com&ca=1',
+ 'c_n=My%20content%204&c_p=My%20content%204&c_t=http%3A%2F%2Fimg4.example.com&ca=1',
+ 'c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fanylink5&ca=1',
+ 'c_n=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_p=http%3A%2F%2Fwww.example.com%2Fpath%2Fxyz.jpg&c_t=http%3A%2F%2Fimg6.example.com&ca=1',
+ 'c_n=My%20Ad%207&c_p=Unknown&c_t=http%3A%2F%2Fimg7.example.com&ca=1'
];
stop();
@@ -4532,8 +4536,8 @@ if ($mysql) {
secondRequest = 0;
}
- assertTrackingRequest(requests[firstRequest], 'c_n=MyName&c_p=Unknown');
- assertTrackingRequest(requests[secondRequest], 'c_n=Any%3A%2F%2FName&c_p=AnyPiece%3F&c_t=http%3A%2F%2Fwww.example.com');
+ assertTrackingRequest(requests[firstRequest], 'c_n=MyName&c_p=Unknown&ca=1');
+ assertTrackingRequest(requests[secondRequest], 'c_n=Any%3A%2F%2FName&c_p=AnyPiece%3F&c_t=http%3A%2F%2Fwww.example.com&ca=1');
// trackContentInteraction()
@@ -4550,8 +4554,8 @@ if ($mysql) {
secondRequest = 0;
}
- assertTrackingRequest(requests[firstRequest], 'c_i=Clicke&c_n=IntName&c_p=Unknown');
- assertTrackingRequest(requests[secondRequest], 'c_i=Clicki&c_n=IntN%3A%2Fame&c_p=IntPiece%3F&c_t=http%3A%2F%2Fint.example.com');
+ assertTrackingRequest(requests[firstRequest], 'c_i=Clicke&c_n=IntName&c_p=Unknown&ca=1');
+ assertTrackingRequest(requests[secondRequest], 'c_i=Clicki&c_n=IntN%3A%2Fame&c_p=IntPiece%3F&c_t=http%3A%2F%2Fint.example.com&ca=1');
// trackContentInteractionNode()
@@ -4561,7 +4565,7 @@ if ($mysql) {
requests = results.match(/<span\>(.*?)\<\/span\>/g);
requests.shift();
- assertTrackingRequest(requests[0], 'c_i=Clicki%3Fiii&c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fanylink5');
+ assertTrackingRequest(requests[0], 'c_i=Clicki%3Fiii&c_n=My%20Ad%205&c_p=http%3A%2F%2Fimg5.example.com%2Fpath%2Fxyz.jpg&c_t=' + originEncoded + '%2Fanylink5&ca=1');
// enableTrackOnlyVisibleContent() && trackAllContentImpressions()
@@ -4808,7 +4812,7 @@ if ($mysql) {
var requests = results.match(/<span\>(.*?)\<\/span\>/g);
requests.shift();
- assertTrackingRequest(requests[0], 'c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com');
+ assertTrackingRequest(requests[0], 'c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com&ca=1');
results = fetchTrackedRequests(token2);
@@ -4817,7 +4821,7 @@ if ($mysql) {
requests = results.match(/<span\>(.*?)\<\/span\>/g);
requests.shift();
- assertTrackingRequest(requests[0], 'link=http%3A%2F%2Fimg2.example.com%2F&c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com');
+ assertTrackingRequest(requests[0], 'link=http%3A%2F%2Fimg2.example.com%2F&c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com&ca=1');
results = fetchTrackedRequests(token3);
@@ -4826,7 +4830,7 @@ if ($mysql) {
requests = results.match(/<span\>(.*?)\<\/span\>/g);
requests.shift();
- assertTrackingRequest(requests[0], 'link=http%3A%2F%2Fimg2.example.com%2F&c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com');
+ assertTrackingRequest(requests[0], 'link=http%3A%2F%2Fimg2.example.com%2F&c_i=click&c_n=img.jpg&c_p=img.jpg&c_t=http%3A%2F%2Fimg2.example.com&ca=1');
results = fetchTrackedRequests(token4);