Find Jobs
Hire Freelancers

Add Cookie To My Search Engine Only Script

$25-30 USD

Annulé
Publié il y a plus de 12 ans

$25-30 USD

Payé lors de la livraison
I switched my site over to a caching system and now I'm having problems with my plugin that only showed ads to people coming from search engines (better quality clicks that way). So I decided to search the internet for a javascript alternative and I found one, but I need a simple change made. I need the script to add a cookie that expires after a certain amount of time. The cookie should make it so the visitor continues to see the ad for an hour or so after coming from the Search Engines. I also want a version that only shows ads to non-search engine visitors. I want the code that I put on my site to look like this: <script type="text/javascript" src="/folder/[login to view URL]"></script> <script type="text/javascript">myvisitor();</script> Most of the work has already been done: [login to view URL] [login to view URL] So it shouldn't take that long. I have examples below. ## Deliverables -----------Change This Code:A1611------------------ URL: /folder/[login to view URL] var ref = [login to view URL]; var sevisitor; var SE = new Array('[login to view URL]', 'search.', '[login to view URL]', '[login to view URL]', '.yahoo.','/url','/search','.google.','.ask.','.baidu.','.bing.','.aol.','.answers.'); for ( var source in SE){ var match = [login to view URL](SE[source]); if (match !=-1) { sevisitor=true; } } function myvisitor(){ if (sevisitor){ var large = 'You Are A Search Engine Visitor<br>'; [login to view URL](large); } } -----------END CODE------------------ What I add to my page: ---code I add to my page---- <script type="text/javascript" src="/folder/[login to view URL]"></script> <script type="text/javascript">myvisitor();</script> ---code I add to my page---- Is it possible to change that code that I "add to my page" into php so that the text is crawled by the search engines without changing "[login to view URL]"? ---Example Code That Sets Cookie--- <script type='text/javascript'> //<![CDATA[ var ref = [login to view URL]; var se = new Array('/search?', 'images.google.', '[login to view URL]', 'search.', '[login to view URL]', '[login to view URL]', '/search/', '.yahoo.'); var sevisitor = false; for (var i = 0; i <= se.length-1; i++) { if ([login to view URL](se[i])!== -1) { var expiry = new Date (); [login to view URL]([login to view URL]() + 3600000); [login to view URL] = "sevisitor=1; expires=" + expiry + "; path=/; domain=[login to view URL]"; sevisitor = true; } } //]]> </script> ---Example Code That Sets Cookie--- I want two versions of this script. One that shows ads to search engine visitors only and one that shows ads to visitors not coming from the search engines. Both of should add a cookie like the example shown.
N° de projet : 3593271

Concernant le projet

Projet à distance
Actif à il y a 13 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux

À propos du client

Drapeau de UNITED STATES
Saint Louis, United States
5,0
104
Membre depuis janv. 7, 2008

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.