Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
336 views
in Technique[技术] by (71.8m points)

android - How to get document.referrer from a Instagram app navigation?

A website I work with has an instagram account and users can navigate to their website by clicking "Stories" on the instagram account. When a user does this, the webpage that opens doesn't open in safari but an in-app browser of sorts. I'm noticing that some issues are arising from users that navigate from instagram so I'm trying to use document.referrer but the result is always blank...

What I've tried:

  1. I tried going to actual instagram.com on safari on my iPhone (connected to my macbook) and by use of a console log, saw the referrer when clicking a story was l.instagram.com.
  2. Since I cannot view the console for an app, I assumed that my original document.referrer check was going to work so implemented it but found it was not evaluating to true. I confirmed this further by writing 2 test elements to the page. First one just had the text "test" and the 2nd would have the "document.referrer". I saw the test text, but the other div was empty.

What I've assumed at this point:

  1. since I'm still "in instagram", the referrer does not have a value since it shows up as blank.
  2. document.referrer is not going to help me here but I wanted to ask here to confirm that.

If document.referrer is not going to help me target users navigating via stories on instagram, what is a way I can do this?

Thanks!

question from:https://stackoverflow.com/questions/65893306/how-to-get-document-referrer-from-a-instagram-app-navigation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...