Skip to main content

Share your best marketing analytics trick and get a chance to win! šŸ† šŸŽ‰ (Ended)

  • June 10, 2024
  • 27 replies
  • 1376 views

Show first post

27 replies

Filipe
Forum|alt.badge.img+1
  • Newbie
  • November 5, 2024

@SandrinhaĀ if you are usingĀ Instagram Insights connector, use the dimension Media Peremalink:

If you are using the Facebok Ads connector, use the dimension Link to Insgram post:

Just a pratical example:

Here’s a Forbes reel. The ā€œmedia URLā€ will return the temporary file. The Link to Instagram or the Media Permalink will return exactly theĀ permanent post URL:Ā https://www.instagram.com/reel/DB94blLSX0P/.

The permanent thumbnail file is located in this URLĀ https://www.instagram.com/p/DB94blLSX0P/media

The trick to do this is REGEX_REPLACE(Media Permalink, ā€œ/reelā€, ā€œ/pā€) to change the middle part of the URL, and CONCAT with ā€œmediaā€ at the end.

Ā 

Let me know if changing the dimension worked.


Filipe
Forum|alt.badge.img+1
  • Newbie
  • June 9, 2025

@Sandrinha,Ā 

Your goal is to makeĀ Ā https://www.instagram.com/reel/C2PjkZjO_NO/Ā turn intoĀ https://www.instagram.com/p/C2PjkZjO_NO/media.

Ā 

Basicly we have two steps here:

  1. REPLACE ā€œ/reelā€ for ā€œ/pā€, to normalize the URLs;
    Using this function REGEXP_REPLACE(Link to post, "reel", "p"), lets call it ā€œnormalized URLā€.
  2. CONCATENATE media at the end of the URL
    Using this function CONCATENATE( normalized URL, ā€œmediaā€).

Your function is:

REGEXP_REPLACE(REGEXP_REPLACE(Link to post, "reel", "p"), "media", "")Ā 

but it should be:

CONCATENATE(REGEXP_REPLACE(Link to post, "reel", "p"), "media")Ā 

Let me know if it works!

Ā