Notifications
Clear all

How do I make links work so they open in the iframe?

11 Posts
3 Users
0 Reactions
1,711 Views
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

I don't see a shortcode. About google analytics. This is the unknown thing. I did some investigations a while ago and it seems no one really knows. A while ago they said iframe are not tracked at all. Then that it is treated as part of the page with a lower ranking.

So I cannot really tell you the tracking. If your tracking relates to cookies: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/how-to-use-the-samesite-cookie-fix

This can maybe help you.

Best regards,

Michael

 

Reply
Posts: 16
 xega
Topic starter
(@xega)
Eminent Member
Joined: 3 years ago

Hi Michael

Thank you for your reply.
If I understand correctly, I can get Google Analytics tracking to work by using your guide: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/how-to-use-the-samesite-cookie-fix

Before I try to get that to work I want to ask you if I am understanding everything correctly.

My iframe content is on the same domain, not wordpress, so I have to install the Advanced iframe manually.

I will copy the file wp-content\plugins\advanced-iframe\includes\advanced-iframe-main-cookie.php in the root of the iframe content (www.legstadaleit.com/tng) - (my wordpress installation is in the folder www.legstadaleit.com/wp).

Then I add include advanced-iframe-main-cookie.php;
AdvancedIframeCookie::addCookieSameSite('ALL'); to the functions.php file in the /tng/ folder (iframe content).

Do I need to do something in the wordpress installation (/wp/ folder)?

Would you recommend this setup or the .htaccess method to get Analytics tracking to work in the iframe?

Best regards
Rakel

Reply
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

I don't know if google analytics is fixed when you change some cookies. This is one option if the cookies are a problem. Still google should set tracking cookies correctly also for an iframe. But this is something you simply have to try.

I would recommend the .htaccess method! Because the other one only covers the pages where you include the extra code. Also I don't understand why you have a /tng/functions.php where you include my code.
The problem is the right place. You need to include it after the cookies are set. If they are e.g. generated by Javascript then you cannot fix it at all. 

Then you maybe get more answers in some google analytic forums if this is possible to be solved.

Best regards, Michael

Reply
Posts: 1
(@battista48)
New Member
Joined: 3 years ago

To force a single link from iframe to open in the parent window: add target="_PARENT" within that links anchor tag. To force ALL links from iframe to open in the parent window: add the base tag with target="_PARENT" in the head section of the iframe html page.

Reply
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Any my plugin can do this dynamically by configuration ;).

Best regards, Michael

 

Reply
Page 2 / 2