l'ami-râle a écrit: mais je comprend pas l'anglais ...
Bon, je fais ma BA de 2011 (Attention je parle Anglais comme une vache Espagnole

) :
IWEB : ADDING GOOGLE ANALYTICS WITHOUT EDITING THE WEBPAGE
IWEB : JOUEZ à BigBrotherIsWatchingYou sans vous casser la têteGoogle Analytics is a service that tracks the visitors of your webpage and provides information about where they come from, what pages they visit, what they use as Operating System and Browser and how long they stayed on your website. And a lot more.
Google Analytics est un immonde espion qui met au grand jour tout les petits travers de vos visiteurs...Google uses JavaScript code which you have to paste in the webpage.
Google utilise du code Javascript que vous avez insérer dans vos pages...iWeb has no way of adding this to the webpage. After publishing you must open the html file in a plaintext editor and paste the code before the </body> HTML element. Then save the page.
Iweb n’a pas la possibilité d’ajouter ce type de code dans vos pages. Il est nul !
Après publication, vous devez ouvrir le fichier HTML avec un éditeur de texte et placer le code manuellement avant l’élément </body> , puis sauvegarder le fichier HTLM.Everytime you edit the page in iWeb, you have to edit the published page again to add the code.
A chaque fois que vous éditez cette page dans Iweb, vous devez de nouveau éditer le fichier HTML, placer le code et sauvegarder. Ben voyons, on a que ça à faire ! Rather cumbersome.
Saloperie d’Iweb !!Here's how you can add the code with the HTML Snippet.
Voici un moyen de contourner cette honteuse injustice et donc voici comment ajouter le code JavaScript avec un Fragment HTML.Go to Google Analytics and sign-up for an account if you haven't already done that.
Aller sur Google Analytics et créer un compte si ce n’est pas déjà fait.Create a new profile for your website.
Créer un nouveau profile pour votre site web.It will provide you with a Webuser ID and the JavaScript code :
Cela va vous générer un identifiant “Webuser ID” et le code JavaScript :<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxx-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>Open a plaintext document (I use Fraise, formerly Smultron) and paste the code without these lines :
Ouvrir un éditeur de texte (Smultron c’est très bien et gratuit...) et coller ce code SANS les lignes : <script type="text/javascript">
</script>Save the file as plaintext and give it a meaningful name : I use analytics.js
Enregistrer le fichier (au format texte) en lui donnant le nom analytics.js (ou un autre nom mais avec l’extention .js ) sur votre ordinateur.Connect to your webserver and create a folder in the root of the server and put the file in it. I call this folder js.
Connectez-vous sur votre site web (avec FileZilla par exemple) et créer un répertoire à la RACINE de votre serveur. Copier votre fichier analytics.js dedans.Open iWeb and select the Site and page you want to track.
Ouvrir Iweb et se rendre sur la page que vous voulez analyser.Add the HTML Snippet and paste this code :
Créer un fragment HTML sur cette page et insérer ce code :<script type="text/javascript">
var bodyID = parent.document.getElementsByTagName("body")[0];
var newScript = parent.document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = '/js/analytics.js';
bodyID.appendChild(newScript);
</script>Publish the page and open it in the browser. In Safari open the Activity window (Command-Option-A).
Publier la page et ouvrez-la avec Safari. Dans le menu de Safari, choisir “Fenêtre”, puis “Activité” (Command-Option-A).Check to see that the /js/analytics.js file is loaded correctly and a very long URL to Google is present.
Vérifier que le fichier /js/analytics.js est chargé correctement et qu’une très longue URL Google est présente.Ensuite j’ai pas tout compris donc c’est une traduction "à la louche"...
The newScript.src = '/js/analytics.js'; only works when you have your own domain.
Le Script newScript.src = '/js/analytics.js' ne fonctionne que si vous avez votre propre domaine.If you use both web.me.com/username and Personal domain, use newScript.src = '../js/analytics.js'; for non-blog pages and newScript.src = '../../js/analytics.js'; with the main blog page.
Si vous utilisez à la fois web.me.com/username et un domain personnel, utilisez newScript.src = '../js/analytics.js' pour les pages autres que des pages Blog, et newScript.src = '../../js/analytics.js' pour une page Blog (pas une page Entrée ou Archive si je comprends bien le bidule...)And again, verify it.
Priez et vérifiez à nouveau.Bon courage !
Donnez-nous vos retour, et envoyez vos dons à : Les9viesduchat
