Skip to content
Extraits de code Groupes Projets
Valider 2a245720 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Fixing Tests & Help message

git-svn-id: http://dev.piwik.org/svn/trunk@3877 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent e42dddb7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -376,7 +376,7 @@ function DisplayTopKeywords($url = "") ...@@ -376,7 +376,7 @@ function DisplayTopKeywords($url = "")
This widget makes it easy to use Piwik to <i>automatically display the list of Top Keywords</i>, for each of your website Page URLs.</p> This widget makes it easy to use Piwik to <i>automatically display the list of Top Keywords</i>, for each of your website Page URLs.</p>
<p> <p>
<b>Example API URL</b> - For example if you would like to get the top 10 keywords, used last week, to land on the page <a target='_blank' href='$topPageUrl'>$topPageUrl</a>, <b>Example API URL</b> - For example if you would like to get the top 10 keywords, used last week, to land on the page <a target='_blank' href='$topPageUrl'>$topPageUrl</a>,
in format JSON: you would dynamically fetch the data <a target='_blank' href='$jsonRequest&url=".urlencode($topPageUrl)."'>this API request Url</a>. Make sure you encode the 'url' parameter in the URL.</p> in format JSON: you would dynamically fetch the data using <a target='_blank' href='$jsonRequest&url=".urlencode($topPageUrl)."'>this API request URL</a>. Make sure you encode the 'url' parameter in the URL.</p>
<p><b>PHP Function ready to use!</b> - If you use PHP on your website, we have prepared a small code snippet that you can copy paste in your Website PHP files. You can then simply call the function <code>DisplayTopKeywords();</code> anywhere in your template, at the bottom of the content or in your blog sidebar. <p><b>PHP Function ready to use!</b> - If you use PHP on your website, we have prepared a small code snippet that you can copy paste in your Website PHP files. You can then simply call the function <code>DisplayTopKeywords();</code> anywhere in your template, at the bottom of the content or in your blog sidebar.
If you run this code in your page $topPageUrl, it would output the following:"; If you run this code in your page $topPageUrl, it would output the following:";
...@@ -384,11 +384,17 @@ function DisplayTopKeywords($url = "") ...@@ -384,11 +384,17 @@ function DisplayTopKeywords($url = "")
echo "<div style='width:400px;margin-left:20px;padding:10px;border:1px solid black;'>"; echo "<div style='width:400px;margin-left:20px;padding:10px;border:1px solid black;'>";
eval($code); eval($code);
DisplayTopKeywords($topPageUrl); DisplayTopKeywords($topPageUrl);
echo "</div>
echo "</div><br/>
<p>Here is the PHP function that you can paste in your pages:</P>
<textarea cols=60 rows=8>&lt;?php\n" . htmlspecialchars($code) . "\n DisplayTopKeywords();</textarea>
"; ";
echo "<br/><p>Here is the PHP function that you can paste in your pages:</P> echo "
<textarea cols=60 rows=8>&lt;?php\n" . htmlspecialchars($code) . "\n DisplayTopKeywords();</textarea>"; <p><b>Notes</b>: You can for example edit the code to to make the Top search keywords link to your Website search result pages.
<br/>On medium to large traffic websites, we recommend to cache this data, as to minimize the performance impact of calling the Piwik API on each page view.
</p>
";
} }
......
<?xml version="1.0" encoding="utf-8" ?>
<result />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<result />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<result />
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter