0

I just implemented a youtube-popup with magnific-popup and this is the code I'm using:

 setTimeout(function(){
$.magnificPopup.open({
  items: {
      src: 'http://www.youtube.com/watch?v=0O2aH4XLbto'
  },
  type: 'iframe'
});
}, 5000)

I would now like to show this popup for every user that visit the page only once for every user. Is there any possibility to do that? The problem I have is, that I can only implement the code in a global footer (it is not my page) and it would load on every subpage as well (which would be a bad idea).

Paranoia
  • 2,040
  • 5
  • 25
  • 27

1 Answers1

0

You could just write a Cookie to the Response of the user. If the Cookie is set, you could render a hidden field to your page and check if the field is set or not.

JoeJoe87577
  • 512
  • 3
  • 17