Imbedding Strava Maps? - CycleBlaze

Bicycle Travel Forum

Imbedding Strava Maps?

Mike Jamison

Hi Gang - Need a little help/refresher on imbedding maps from Strava activities to a journal here on CB. I've managed that in the past by doing the following:  Going to the specific Strava activity, clicking on the "imbed on blog" icon, copying the code given to me by Strava, going to the specific journal page on Cycle Blaze, choosing the "Embed Map" icon under the "Post Content" menu to place that Strava map on the journal page. Just tried to do that for an old journal I am finally getting around to posting there .... but ... using the same process described above I get an error message from CB saying, "Embedding code must include the <iframe> tag. The code you provided is missing this tag."  The original activity is from 2017, but I'm not sure if this matters or not in terms of the code Strava is giving me. 

Anybody catch any flaws in what I did? Its been a while since I've done this on a CB journal so there's a decent chance I missed a step. Help!

Reply    Link    Flag
1 year ago
Gregory GarceauTo Mike Jamison

Hi Mike, I saw your question a few days ago, I read all of your proceedures, and couldn't picture what was going wrong.  I just got done successfully posting a map to my upcoming journal page and I was feeling quite cocky and fully qualified to help you out.  I re-read everything you did and STILL didn't get it.  I re-read it again, and somehow the word "Strava" appeared out of nowhere this time.  Ah, Strava.  Sorry, I know nothing of Strava.  I (and I think most folks here) use RidewithGPS.

Reply    Link    Flag
1 year ago
Bob DistelbergTo Mike Jamison

So, just for fun I played around a little with this today. When I tried to do this on my iPad, I actually got the exact same error message as you. It looks like somehow the "imbed on blog" link was not actually copying the info into the clipboard, so when I tried to paste it into the field in Cycleblaze, it was blank. When I tried it on my laptop, it worked just fine.

The only other thing I thought of is to make sure the Strava entry is marked as Public. If it's access is just for Followers, it won't work, although that error message is different than the one you mentioned.

Reply    Link    Flag
1 year ago
Mike JamisonTo Bob Distelberg

Thanks Bob (and Greg!) for the ideas. I'm flummoxed, as my privacy settings in Strava are all set to public/everyone (I have no secrets!) and I am using my desktop computer for this rather than an iPad or phone. I'm guessing that something involving Strava's current imbed code is not playing well with something set up in CycleBlaze. Strava imbed code worked like a charm on earlier journals I'd re-posted here. Oh well ... not worth spending too much time on, and apologies for the old journal I'm posting here lacking maps. I love maps to see where people have ridden and I'm bummed mine will not have them available. Thanks anyone guys!

Reply    Link    Flag
1 year ago
Bob DistelbergTo Mike Jamison

Sorry that didn't help. I did try again and was able to successfully put in a Strava map. So, the only other suggestion I can make is double checking that code that you paste into the "Enter embedding code from RidewithGPS or Strava" box. It should start with "<iframe" and end with "</iframe>". In my case, it looked like this:

<iframe height='405' width='590' frameborder='0' allowtransparency='true' scrolling='no' src='https://www.strava.com/activities/7446696738/embed/958f9eb5af533b24fe3964c7794aab5d2e7ef285'></iframe>

You could also paste your code here, and perhaps Jeff or somebody else might take a look at it and offer suggestions.

Reply    Link    Flag
1 year ago
Mike JamisonTo Bob Distelberg

Thank you again Bob, and good advice. I will post this for Jeff or any other coding expert to look at: Here's what I get from Strava as the "embed code" to use for a specific activity I want to use with a journal here. It is different than yours, which contains the crucial "iframe" reference ....  I tried the same with some recent rides and all of those also yielded a code starting with "<div class" instead of "iframe."

<div class='strava-embed-placeholder' data-embed-type='activity' data-embed-id='1064994943'></div><script src='https://strava-embeds.com/embed.js'></script>

Any thoughts? I can also send a request for assistance to Strava, which I'll also do. 

Reply    Link    Flag
1 year ago
Bob DistelbergTo Mike Jamison

Hmmm, that is pretty odd, and obviously is not going to work. I'll just highlight the process I used to get my embed code.

In Strava from the dashboard, I click on the activity I want to display. Across the top right, there's a couple of links, one for Facebook, One for Twitter, and then one with the 3 dots/2 diagonal lines. Clicking on that 3 dots/2 lines, I then get the dialog box that had the iframe code visible in it, with a button you can use to copy. I guess if you're getting something different at that point, it must be a Strava issue. So, yes maybe contacting Strava is the thing to do. I think I'm out of ideas.

Reply    Link    Flag
1 year ago
Bob DistelbergTo Mike Jamison

One last idea... In case you can't tell, I get obsessive about solving problems like this. By any chance, are you logged into a different Strava account than the one that created the activity? I ask because if I click on the embed on blog link for someone's activity other than my own (that is, someone I'm following on Strava), I get that same 'div' code that you got rather than an iframe. 

Ok, now I am truly out of ideas.

Reply    Link    Flag
1 year ago
Mike JamisonTo Bob Distelberg

You and I are fellow obsessives about stuff like this Bob! Man, I have fiddled around with every variation I can think of to no avail. First, I can verify that I was/am logged in as myself to try to grab that imbed code, and I have scoured every Strava privacy setting that I can find, and it seems they are all set to public/everyone. I even logged into my wife's Strava account and tested what happened when I sought an imbed code for one of her activities ... the result was the same - lacking the "iframe" reference and instead having the "div class" prefix instead. I use a Mac computer and wonder if the OS that updated a few weeks ago could have anything to do with this. I sent a help request to Strava with a lengthy explanation of what's happening ... hopefully they can set me straight. I'll let you know how they respond. Maybe a Ghost in the Machine : - )

Reply    Link    Flag
1 year ago
Bob DistelbergTo Mike Jamison

So, I think I finally understand what's happening. I know, I said I was out of ideas, but, new day, new ideas... Anyway, it looks like Strava can give you two kinds of embed code to show an activity, either an <iframe, or a <div construct that includes some javascript. Which one it uses appears to be controlled by the privacy setting for your profile page (Settings->Privacy Control->Profile Page). Note that this the setting for your profile page, not for the activity itself. If your profile page setting is set to 'Everyone', then Strava will generate the <div construct. If it's set to 'Followers', then you get the <iframe. I found all this sort of vaguely mentioned in the Strava support pages, but was able to verify the behavior with my own account.

It looks like the editor in Cycleblaze only supports iframe at this time as near as I can tell.

Reply    Link    Flag
1 year ago