Reply to topic  [ 8 posts ] 
iTunes Store links (correct country) 
Author Message
Doesn't have much of a life
User avatar

Joined: Wed Apr 29, 2009 9:33 am
Posts: 667
Reply with quote
The Dick Venom & The Terrortones single is going to be available from various digital download stores including iTunes and Amazon.

I want to include a link to these stores from our merchandise page and also in an email I'm currently building. However when I make the link using the iTunes Link Maker I have to specify a particular country's store.

Has anyone who has done this before know of any way to make a link that will direct people to the correct country store based on their location?

_________________
UltraSonic f***erPhonic ZombieShockin TrailerRockin BabyBoomin GaitorGroomin InterStellar LadyRaiders


Wed Sep 21, 2011 11:49 am
Profile WWW
Doesn't have much of a life
User avatar

Joined: Wed Apr 29, 2009 9:33 am
Posts: 667
Reply with quote
No-one?

I miss the MacUser forum...

:-(

_________________
UltraSonic f***erPhonic ZombieShockin TrailerRockin BabyBoomin GaitorGroomin InterStellar LadyRaiders


Sun Sep 25, 2011 7:33 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
It's non-trivial. You either have to rely on detecting the user's browser language settings or look up their IP in a table. Try Googling for "geolocation php script", first hit gives you this:

http://www.54bys.net/web-script/ip-addr ... cript.html

Quote:
Have you ever wondered how a web site identifies your location or country of origin and automatically redirects you to a different web content? . . .


Also found this: http://script.wareseeker.com/download/g ... 329a7fd4f7

That definitely works. Quick proof of concept here: http://x404.yourwired.net/

Using data from here: http://www.hostip.info/

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Sun Sep 25, 2011 8:21 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
OK now updated it to actually generate the itunes link for the UK, US and Japan. CBA to type the rest in and I'm sure there's a better way, but it seems to work:

Link: http://x404.yourwired.net/

Source:

Code:
<?php
   include 'GeoLocation.class.php';
   $geo = new GeoLocation($_SERVER['REMOTE_ADDR']);
   // instance now contains (city, country, longitude, lattitude) info
   echo "This checks your IP: $_SERVER[REMOTE_ADDR] against the hostip.info database to find the geographic information:<br />$geo->city, $geo->country ($geo->longitude, $geo->latitude)<br /> Now you know the country we can pick the url accordingly: <br /> ";
   
   echo "<a href=\"http://www.apple.com";
   switch ($geo->country) {
    case "UNITED KINGDOM":
        echo "/uk";
        break;
    case "JAPAN":
        echo "/jp";
        break;
    default:
        //anything else gets the US
       ;
    }
   echo "/itunes/download/\"> click for itunes </a>";
?>

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Wed Sep 28, 2011 12:22 am
Profile WWW
Doesn't have much of a life
User avatar

Joined: Wed Apr 29, 2009 9:33 am
Posts: 667
Reply with quote
Fantastic!

Thanks very much for your hard work. I hope to be able to use that on the web site. Unfortunately I had also hoped to use it in the email newsletter that the band sends out once a month, but with it requiring scripting that's a bit of a non-starter...

I don't know if it's just me thinking more globally than the downloads stores, but surely it would make more sense if this was implemented within the store itself. After all the internet allows you to reach people all over the world, and selling downloads is a way of being able to easily get our music to people who can't come to the gigs and buy a CD, and I would suspect that at least 50% of our download sales are going to be people who don't live in the UK.

_________________
UltraSonic f***erPhonic ZombieShockin TrailerRockin BabyBoomin GaitorGroomin InterStellar LadyRaiders


Wed Sep 28, 2011 8:24 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
A lot of websites do implement this automatically, just not iTunes - at least not from any of the pages I've been to.

You can still kind of use it in the mail shot, but you'll have to link to a website other than iTunes and have it redirect them. Of course that is only really practical if you can host the script somewhere the recipients trust - like the band's.

Hope it works out.

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Wed Sep 28, 2011 8:37 am
Profile WWW
Doesn't have much of a life
User avatar

Joined: Wed Apr 29, 2009 9:33 am
Posts: 667
Reply with quote
And neither do Amazon seemingly - the other download store that I want to link to!

_________________
UltraSonic f***erPhonic ZombieShockin TrailerRockin BabyBoomin GaitorGroomin InterStellar LadyRaiders


Wed Sep 28, 2011 10:56 am
Profile WWW
Has a life
User avatar

Joined: Wed Mar 30, 2011 10:38 pm
Posts: 71
Reply with quote
Is that you, Mike?

How about setting yourself up with an iTunes affiliate link, then setting up a webpage that links to that? That way you'll get a 4% kickback, and get stores by territory.


Wed Oct 26, 2011 8:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.