SlideShare uma empresa Scribd logo
1 de 13
Geo-targeting Script : The Ultimate Guide Using  Lambda Geo-target  and others to determine the physical location of your visitors
What can be detemined with geo-targeting? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How to Use  Geo-targeting  on your Site (PHP) ,[object Object],[object Object],[object Object],[object Object],Will output: Atlanta, Georgia, United States If you lived in Atlanta, Georgia Using Lambda Geo-target
How to Find the Nearest Major City Using  Geo-targeting <?php  require(“geoip.php”); echo geoip_closest_format(“%city, %region”, 2000000) ; ?> Will output: Los Angeles, California If you lived in a small town near Los Angeles, California. geoip_closest_format() returns the closest city of 2,000,000 people or more, depending on what you specify. Using Lambda Geo-target
How to Forward a User to a Different URL Based on Location (pt 2) <?php  geoip_forward_region(“California”, “cali.html”); geoip_forward_country(“Georgia”, “ga.html”); geoip_forward_contient(“NA”, “na.html”); geoip_forward(“catchall.html”); ?> This will forward California users first, then Georgia users, then will forward all other users in North America. Finally, all users who aren’t in the above groups will be forwarded to catchall.html. Using Lambda Geo-target
How to display a Map with the User’s Location <script type=&quot;text/javascript&quot;>  if (GBrowserIsCompatible()) {  var map = new GMap2(document.getElementById(&quot; map_container &quot;));  map.setCenter(new GLatLng( <?php echo geoip_latitude . “, “ . geoip_longitude(); ?> ),  6 );  map.setUIToDefault(); var point = new GLatLng( <?php echo geoip_latitude . “, “ . geoip_longitude(); ?> );  map.addOverlay(new GMarker(point)); }  </script>  Using Lambda Geo-target  and  Google  Maps <script src=&quot;http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key= api_key &quot; type=&quot;text/javascript&quot;></script>   Put this somewhere after your <body> tag: Put this in between your <head> and </head> tags: Replace api_key with your Google Maps API key. Replace map_container with the id of the <div> where you want the map to go. Replace the number 6 with the zoom level you want.
Displaying the User’s location on the Maps The end result will look something like this. There are all sorts of neat things you can do with Google maps and the user’s location. Get creative.
How Does Geo-targeting help SEO? ,[object Object],[object Object],[object Object],[object Object]
Common Mistakes ,[object Object],[object Object],[object Object],[object Object]
Don’t Forget to Update your Database! ,[object Object]
Beware of Javascript ,[object Object],[object Object],[object Object]
Beware of Third Party APIs ,[object Object],[object Object]
You’re All Set! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Destaque

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Geo targeting-ultimate-guide

  • 1. Geo-targeting Script : The Ultimate Guide Using Lambda Geo-target and others to determine the physical location of your visitors
  • 2.
  • 3.
  • 4. How to Find the Nearest Major City Using Geo-targeting <?php require(“geoip.php”); echo geoip_closest_format(“%city, %region”, 2000000) ; ?> Will output: Los Angeles, California If you lived in a small town near Los Angeles, California. geoip_closest_format() returns the closest city of 2,000,000 people or more, depending on what you specify. Using Lambda Geo-target
  • 5. How to Forward a User to a Different URL Based on Location (pt 2) <?php geoip_forward_region(“California”, “cali.html”); geoip_forward_country(“Georgia”, “ga.html”); geoip_forward_contient(“NA”, “na.html”); geoip_forward(“catchall.html”); ?> This will forward California users first, then Georgia users, then will forward all other users in North America. Finally, all users who aren’t in the above groups will be forwarded to catchall.html. Using Lambda Geo-target
  • 6. How to display a Map with the User’s Location <script type=&quot;text/javascript&quot;> if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById(&quot; map_container &quot;)); map.setCenter(new GLatLng( <?php echo geoip_latitude . “, “ . geoip_longitude(); ?> ), 6 ); map.setUIToDefault(); var point = new GLatLng( <?php echo geoip_latitude . “, “ . geoip_longitude(); ?> ); map.addOverlay(new GMarker(point)); } </script> Using Lambda Geo-target and Google Maps <script src=&quot;http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key= api_key &quot; type=&quot;text/javascript&quot;></script> Put this somewhere after your <body> tag: Put this in between your <head> and </head> tags: Replace api_key with your Google Maps API key. Replace map_container with the id of the <div> where you want the map to go. Replace the number 6 with the zoom level you want.
  • 7. Displaying the User’s location on the Maps The end result will look something like this. There are all sorts of neat things you can do with Google maps and the user’s location. Get creative.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.