I have an external bio link on my Instagram business page, i want to detect "which" Instagram users click on link and visited my website.

Is this possible by analyzing referral link or other ways? , and is this even legal?

  • What does the referral link look like? Please give an example. Most sites don't identify their users in the URL, but I'm not familiar with instagram specifically. Commented Apr 4, 2018 at 20:23

2 Answers 2



You cannot detect which users clicked on your Instagram external link.

An external Instagram link looks something like this:


Breaking it down, we can see that there are two GET variables in the query string of the URL:

    ? u = https://www.example.com/
    & e = ATPww3V7arueU2tZJxZn2sop0is5m0U3NkJrH05Fz0nud9ENOn38ULgxXDwDvUMwCGDzDqaNXEHn7uzk

Instagram refers to this link as external_url_linkshimmed in the JSON data that can be found stored in window._sharedData (web browser).

  • The u parameter most likely stands for URL and simply stores the external URL that was added to your profile.
  • The e parameter most likely stands for external or event and stores tracking data that Instagram uses for analytics. This value always appears to be 80 characters, and it changes every time someone visits the profile. This value is probably the result of a hash function.

None of this data will allow a user to track who clicked the link, so you cannot use document.referrer (client-side) or $_SERVER['HTTP_REFERER'] (server-side) to determine the identity of another user.

If this was possible (which it is not) it would be a major privacy shortcoming of Instagram.


I do not think it is possible to determine which Instagram user visited your page from an Instagram link. In order to get this data, you would need approval from Instagram (which would most likely come from their API). Most API services may allow you to find out a user's username, but this generally requires that the user gives you permission to know who they are (example: signing in).

You can use http_referer in PHP to determine where a user came from, but this requires that a user came from an HTTP address as http_referer does not work with HTTPS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.