The Internet has made the world a much smaller place. Your website can reach practically anywhere on Earth. Wouldn’t it make sense to immediately serve your visitors the relevant, accurate content that they’re looking for, versus making them select their geographic location from a pulldown menu or a map? Not knowing the physical location of your visitors can limit you to only serving generic content that may not be relevant to visitors coming from different locations. That can kill engagement and negatively impact sales – just watch your bounce rate climb! In this session, learn about the uses of GeoIP, a technology that gives you the ability to create a “just for you” feeling by presenting geographically-specific content from WordPress sites based on a visitor’s physical location.
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Creating Localized User Experiences with GeoIP
1. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
GeoIP
Using Location Data to
Deliver Relevant Content
|
2. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
i. GeoIP Introduction
ii. Case Studies
iii. Technical Overview
iv. Resources
v. Q&A
Overview
3. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ Visitor selects country
‣ Visitor is redirected to relevant content
‣ Unnecessary manual process
WHAT’S THE PROBLEM?
Many websites rely on user input to select relevant
data for country, region, location, language.
4. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ Find out where a user is
‣ Find if content relevant to location
‣ Deliver relevant content
WHAT IS GEOIP?
A solution for delivering relevant content to users
in order to optimize user journey and improve experience.
5. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ Match user’s IP address, find location
‣ Match location ID to pull details
(country, city, region, post code )
‣ Create rules based on location
‣ Deliver cached relevant content
HOW DOES GEOIP WORK?
6. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
✓Redirecting traffic to local country or language
✓Change currency, tax, shipping info specific for eCommerce
✓Location based marketing campaigns, advertising
✓Onsite/offsite content
✓Legal information or requirements
✓What’s closest to me?
WHAT IS GEOIP USED FOR?
7. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDIES
8. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDY: VINCENTIUS APPAREL
9. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDY: VINCENTIUS APPAREL
Vincentius Apparel, founded in 2012, is a global clothing
company that caters to sporting and fashion enthusiasts with a
unique line of high-fashion football-themed hats and jerseys.
10. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ Improve user journey while shopping.
‣ Maximise performance
CASE STUDY: VINCENTIUS APPAREL
How does Vincentius use GeoIP?
11. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDY: VINCENTIUS APPAREL
“With WP Engine the site is nice and fast. Now we’ve got the best of both
worlds: we’re offering various currencies and the site is going faster.”
- Bruno Crosier, Vincentius Apparel’s co-founder.
12. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDY: ARNETTE EYEWEAR
13. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDY: ARNETTE EYEWEAR
Arnette is an iconic brand that has been building creative
eyewear since 1992. Arnette’s appeal ranges from sports action
stars, celebs, musicians and anyone who wants to look cool.
14. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ Improve user journey while shopping.
‣ Maximise performance
‣ Deliver relevant products lines
CASE STUDY: ARNETTE EYEWEAR
How does Arnette use GeoIP?
15. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
CASE STUDY: ARNETTE EYEWEAR
“We don’t need our site visitors to find their location on a map. Now, they’re
served the correct content every time. It’s improved site accuracy several
times over.”
- Eric Meyers, Arnette Eyewear’s Digital Marketing Specialist
17. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ A WP Engine Business Plan or higher
‣ The WP Engine GeoIP plugin
‣ Shortcodes for using GeoIP in posts
‣ PHP for handling logic or more advanced
template based output
‣ GeoIP Debug Plugin, Debug Bar, Debug Objects
‣ Contact Support to fully enable GeoIP
How do I get started with GeoIP?
TECHNICAL OVERVIEW
18. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
‣ 1. Country $geoip_country_code
‣ 2. State/Region $geoip_region
‣ 3. City $geoip_city
‣ 4. Postal Code $geoip_postal_code
‣ 5. Latitude $geoip_latitude
‣ 6. Longitude $geoip_longitude
What information is available to identify visitors?
TECHNICAL OVERVIEW
19. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
<?php
function
geoip_append_content(
$content
)
{
$geo
=
WPEngineGeoIp::instance();
$content
.=
"How's
the
weather
in
{$geo-‐>city()},
";
$content
.=
“{$geo-‐>country()}?";
return
$content;
//
How’s
the
weather
in
London,
GB?
}
add_filter(
'the_content',
'geoip_append_content'
);
?>
Code Sample
TECHNICAL OVERVIEW
20. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
GEOIP DATABASE - IPs by location
How does GeoIP know my location?
21. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
GEOIP DATABASE - FILTERED BY CITY
How does GeoIP know specific information about my location?
22. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
GEOIP DATABASE - FILTERED BY POSTAL CODE
How does GeoIP know latitude and longitude?
23. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
GEOIP DATABASE - FILTERED BY COUNTRY
What happens when my IP lookup is not specific?
24. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
RESOURCES
25. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
DEVELOPER RESOURCES
Using GeoIP
Troubleshooting
Download the plugin
‣ https://wordpress.org/plugins/wpengine-geoip/other_notes/
‣ http://wpengine.com/support/geoip-personalizing-content-based-geography/
‣ https://wordpress.org/plugins/wpengine-geoip/
Support
‣ https://my.wpengine.com/support#general-issue
26. Edmund Turbin, Solutions Engineer email: edmund.turbin@wpengine.com
twitter: @spicecadet
FAQ
I’m using IPv6. Will GeoIP work for me?
‣ Yes, but you’ll need to develop a custom solution.
I’m not using WP Engine. Can I still use GeoIP?
‣ Yes, the GeoIP db is open source and free to download
I want to use GeoIP for something else not mentioned.
‣ Absolutely! Tell us what you used it for and why it was a good solution.