Skip to content

Instantly share code, notes, and snippets.

@jney
Created June 4, 2010 09:18
Show Gist options
  • Select an option

  • Save jney/425187 to your computer and use it in GitHub Desktop.

Select an option

Save jney/425187 to your computer and use it in GitHub Desktop.
// naissances|anniversaires|autres-evenements|conferences|deces|mariages
var
pathname = location.pathname,
siteId = "Carnet_du_jour",
x2 = 14;
// url = http://carnetdujour.lefigaro.fr/
if (pathname == "/") {
atiTag({
chapters: [siteId,"accueil_carnet_du_jour","accueil_carnet_du_jour","accueil_carnet_du_jour"],
x2: x2,
x3: 14
});
// url = http://carnetdujour.lefigaro.fr/recherche/?_recherche
} else if (pathname == "/recherche/") {
atiTag({
chapters: [siteId, "Recherche","toutes_catgeories","toutes_catgeories"],
x2: x2,
x3: 17
});
// url = http://carnetdujour.lefigaro.fr/passer-annonce/
} else if (pathname == "/passer-annonce/") {
atiTag({
chapters: [siteId,"Passer_une_annonce","Passer_une_annonce","Passer_une_annonce"],
x2: x2,
x3: 16
});
// url = http://carnetdujour.lefigaro.fr/tous-conseils/
} else if (pathname == "/tous-conseils/") {
atiTag({
chapters: [siteId,"tous-conseils","tous-conseils","tous-conseils"],
x2: x2,
x3: 17
});
// url = http://carnetdujour.lefigaro.fr/tous-services/
} else if (pathname == "/tous-services/") {
atiTag({
chapters: [siteId,"tous-services","tous-services","tous-services"],
x2: x2,
x3: 17
});
// url = http://carnetdujour.lefigaro.fr/_categorie/
} else if (pathname.match(/^\/(naissances|anniversaires|autres-evenements|conferences|deces|mariages)\/$/)) {
var category = RegExp.$1;
atiTag({
chapters: [siteId,category,"Accueil_"+category,"Accueil_"+category],
x2: x2,
x3: 15
});
// url = http://carnetdujour.lefigaro.fr/_categorie/recherche/?_recherche
} else if (pathname.match(/^\/([^\/]+)\/recherche\/$/)) {
var category = RegExp.$1;
atiTag({
chapters: [siteId,"Recherche",category,category],
x2: x2,
x3: 17
});
// url = http://carnetdujour.lefigaro.fr/_categorie/annonces/_numero_annonce/
} else if (pathname.match(/^\/([^\/]+)\/annonces\/(\d+)\/$/)) {
var
category = RegExp.$1,
classify = RegExp.$2;
atiTag({
chapters: [siteId,category,classify,classify],
x2: x2,
x3: 15
});
// url = http://carnetdujour.lefigaro.fr/article/_categorie/_nom_dossier/_nom_article
} else if (pathname.match(/^\/article\/([^\/]+)\/([^\/]+)\/([^\/]+)\/$/)) {
var
category = RegExp.$1,
folder = RegExp.$2,
article = RegExp.$3;
atiTag({
chapters: [siteId,category,folder,classify],
x2: x2,
x3: 6,
x4: 14
});
// url = http://carnetdujour.lefigaro.fr/article/_categorie/_nom_dossier/
} else if (pathname.match(/^\/article\/([^\/]+)\/([^\/]+)\/$/)) {
var
category = RegExp.$1,
folder = RegExp.$2;
atiTag({
chapters: [siteId,category,folder,folder],
x2: x2,
x3: 6,
x4: 14
});
} else {
atiTag({ chapters: [siteId,"non_marquees",location.href] });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment