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
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-12-27 05:23:35 +0400
committermattab <matthieu.aubry@gmail.com>2013-12-27 05:23:35 +0400
commitc2dfbcbc288c49904fa1111148dfae87ca15cc68 (patch)
tree98fd6f72127e1685aa8304d491a5f7cb0a4e3ec2
parent2d53f549b32714a58e5d7231958522e93b4bb0d9 (diff)
Removing now unused doc from piwik (it was moved to the piwik.org website at http://piwik.org/docs/tracking-api/ )
-rw-r--r--plugins/SitesManager/Controller.php18
-rw-r--r--plugins/SitesManager/templates/displayAlternativeTagsHelp.twig116
2 files changed, 0 insertions, 134 deletions
diff --git a/plugins/SitesManager/Controller.php b/plugins/SitesManager/Controller.php
index a26bb7db63..f6c316906f 100644
--- a/plugins/SitesManager/Controller.php
+++ b/plugins/SitesManager/Controller.php
@@ -158,24 +158,6 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
return file_get_contents($path . $filename);
}
- /**
- * Used to generate the doc at http://piwik.org/docs/tracking-api/
- */
- function displayAlternativeTagsHelp()
- {
- $view = new View('@SitesManager/displayAlternativeTagsHelp');
- $view->idSite = Common::getRequestVar('idSite');
- $url = Common::getRequestVar('piwikUrl', '', 'string');
- if (empty($url)
- || !UrlHelper::isLookLikeUrl($url)
- ) {
- $url = $view->piwikUrl;
- }
- $view->piwikUrlRequest = $url;
- $view->calledExternally = true;
- return $view->render();
- }
-
function getSitesForAutocompleter()
{
$pattern = Common::getRequestVar('term');
diff --git a/plugins/SitesManager/templates/displayAlternativeTagsHelp.twig b/plugins/SitesManager/templates/displayAlternativeTagsHelp.twig
deleted file mode 100644
index ed1ae6d387..0000000000
--- a/plugins/SitesManager/templates/displayAlternativeTagsHelp.twig
+++ /dev/null
@@ -1,116 +0,0 @@
-<h4>Image Tracker code</h4>
-
-The Image Tracker code can be used when Javascript is not allowed.
-<br/>
-<div class='toggleHelp' id='imageTracker' style='display:none;'>
- <a name='image'>› Display Image Tracker code </a>
-</div>
-
-<div class='imageTracker'>
- <p>Some websites like MySpace or eBay will not allow users to add Javascript to their profile but accept HTML. In this case, you can still track visits with
- Piwik using the Image Tracker.
- <br/>
- <strong>Note</strong>: the code doesn't use Javascript so <strong>Piwik will not be able to track some user information</strong>
- such as search keywords, referrers, screen resolutions, browser plugins and page titles.
- </p>
- <code>
- &lt;!-- Piwik Image Tracker --&gt;
- &lt;img src="{% if piwikUrlRequest is defined %}{{ piwikUrlRequest }}{% else %}{{ piwikUrl }}{% endif %}piwik.php?idsite={{ idSite }}&amp;amp;rec=1" style="border:0" alt="" /&gt;
- &lt;!-- End Piwik --&gt;
- </code>
- <br/>
- The following parameters can also be passed to the image URL:
- <ul>
- <li><em>rec</em> - (required) The parameter &rec=1 is required to force the request to be recorded</li>
- <li><em>idsite</em> - (required) Defines the Website ID being tracked</li>
- <li><em>action_name</em> - Defines the custom Page Title for this page view</li>
- <li><em>urlref</em> - The Referrer URL: must be set to the referrer URL used before landing on the page containing the Image tracker. For example, in PHP
- this value is accessible via
- <pre>$_SERVER['HTTP_REFERER']</pre>
- </li>
- <li><em>idgoal</em> - The request will trigger the given Goal</li>
- <li><em>revenue</em> - Used with idgoal, defines the custom revenue for this conversion</li>
- <li><em>and more!</em> - There are many more parameters you can set beyond the main ones above. See the <a
- href='http://developer.piwik.org/api-reference/tracking-api'>Tracking API documentation page</a>.
- </li>
- </ul>
-</div>
-
-<h4>Piwik Tracking API (Advanced users)</h4>
-It is also possible to call the Piwik Tracking API using your favorite programming language.
-<br/>
-<div class="toggleHelp" id="trackingAPI" style="display:none;"><a name="image">› Display Piwik Tracking API documentation </a></div>
-<div class="trackingAPI">
- <p>Follow these instructions to get started with the PHP Tracking Web API client:</p>
- <ul style='list-style-type:decimal;'>
- <li>
- <a href='{% if piwikUrlRequest is defined %}{{ piwikUrlRequest }}{% else %}{{ piwikUrl }}{% endif %}{{ linkTo({'action':'downloadPiwikTracker'}) }}' target='_blank'>
- Click here to download the file PiwikTracker.php
- </a>
- </li>
- <li>Upload the PiwikTracker.php file in the same path as your project files
- </li>
- <li>Copy the following code, then paste it onto every page you want to track.
- <code>
- &lt;?php
- // -- Piwik Tracking API init --
- require_once "/path/to/PiwikTracker.php";
- PiwikTracker::$URL = '{% if piwikUrlRequest is defined %}{{ piwikUrlRequest }}{% else %}{{ piwikUrl }}{% endif %}';
- ?&gt;
- </code>
- </li>
- <li>Choose a Tracking method, then paste the code onto every page you want to track.
-
- <ul>
- <li><strong>Method 1: Advanced Image Tracker</strong>
- <br/>
-
- <p>The client is used to generate the tracking URL that is wrapped inside a HTML &lt;img src=''&gt; code.
- <br/>Paste this code before the &lt;/body&gt; code in your pages.
- <code>
- &lt;?php
- // Example 1: Tracks a pageview for Website id = {{ idSite }}
- echo '&lt;img src="'. str_replace("&amp;","&amp;amp;", Piwik_getUrlTrackPageView( $idSite = {{ idSite }}, $customTitle = 'This title
- will appear in the report Actions > Page titles')) . '" alt="" /&gt;';
- // Example 2: Triggers a Goal conversion for Website id = {{ idSite }} and Goal id = 2
- // $customRevenue is optional and is set to the amount generated by the current transaction (in online shops for example)
- echo '&lt;img src="'. str_replace("&amp;","&amp;amp;", Piwik_getUrlTrackGoal( $idSite = {{ idSite }}, $idGoal = 2, $customRevenue =
- 39)) . '" alt="" /&gt;';
- ?&gt;
- </code>
- <br/>
- The Advanced Image Tracker method is similar to using the standard Javascript Tracking code. However, some user settings are not
- detected (resolution, local time, plugins and cookie support).
- </p>
-
- </li>
- <li><strong>Method 2: HTTP Request</strong>
- <br/>
-
- <p>You can also query the Piwik Tracker API remotely via HTTP.
- This is useful for environment where you can't execute HTML nor Javascript.
- <br/>Paste this code anywhere in your code where you wish to track a user interaction.
-
- <code>
- &lt;?php
- $piwikTracker = new PiwikTracker( $idSite = {{ idSite }} );
- // You can manually set the visitor details (resolution, time, plugins, etc.)
- // See all other ->set* functions available in the PiwikTracker.php file
- $piwikTracker->setResolution(1600, 1400);
- // Sends Tracker request via http
- $piwikTracker->doTrackPageView('Document title of current page view');
- // You can also track Goal conversions
- $piwikTracker->doTrackGoal($idGoal = 1, $revenue = 42);
- ?&gt;
- </code>
- </p>
- </li>
- </ul>
- </li>
- </ul>
- {% if calledExternally is not defined or not calledExternally %}
- <p>
- Read more about the Piwik Tracking API <a href='http://piwik.org/docs/tracking-api/' target='_blank'>in the documentation</a>.
- </p>
- {% endif %}
-</div>