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:
- 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.
- 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:
- since I'm still "in instagram", the referrer does not have a value since it shows up as blank.
- 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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…