Advanced Scheduling In GTM

Hi All! I’m new in the neighborhood, i’ve was searching in whole forum about Advanced Scheduling In GTM for popups and sticky bars but, I can not find anything.

Anyone who can guide me about it?

Greetings.

3 Likes

Hi! I have the same question :sweat:

1 Like

Hi Gustavo! Hi Lucas! Welcome to the community! :tada:

I oversee the forum, but I’m by no means an expert on this particular subject. However, I know many customers who have a lot of experience here who might be able to chime in.

Those are all starting points, but I think for us to be able to help you best, we’ll need to know specifically what you’re trying to achieve with GTM.

I’ll tag a few folks who have been able to flex some muscle with GTM here in the forums before and perhaps they can keep an eye on the thread: @Kyle.C, @Finge, @Stefano, @Hristian

I’ll also tag the @UnbounceTechTeam as this sort of question comes up from time to time in Support and they may have more insight. :spinbounce:

1 Like

Hey @Gustavo_Papasergio and @Luquitasarg,

As Jess mentioned, if you are comfortable writing/editing a bit of JS, you should be able to add scheduling through GTM.

What exactly do you want to schedule around your popups/sticky bars? (Certain time of days, certain days, promotions between specific hours, etc.)

Best,
Hristian

@Jess & @Hristian thanks to both.
I need to setup a night sale popup that starts every day @ 11 pm and ends to 7 am every day for 7 days. We try triger the unbounce tag from GTM without success.

Thanks in advance.

Hi @Gustavo_Papasergio,

  • What JS did you use in GTM?
  • How did you account for timezones in your GTM JS?
  • What were the trigger settings inside Unbounce for your popup?
  • What does your GTM debugger show when you try to fire the tag?

None of us have access to your GTM, so you’ll have to provide a bit more details in order for us to point you in the right direction.

Hi! @Hristian i try to answer with my best english (i’m not a native speaker) and with a logic order. And i can upload just one image.

1. I have one tag setted up in GTM:

Tag: SciData Test Popup; Type: Personalized HTML; Triggers that activate the tag: “Show between hours”

2. Unbounce tag code:

<script src="https://3adb84d9a2654616974b9c881845bc90.js.ubembed.com" async></script>

Start Date: 9/4/2020 Start time: 00:00
Finish Date: 9/4/2020 Finish time: 00:00
Local Time: GMT -3
Triger: Show between hours

3. Trigger Setup:

Triger Type Pageview - Window Loaded
Local time > 11:00 PM
Local time < 07:00 AM

4. Variables:

Variable type: Personalized Javascript

Local Time; Personalized Javascript

5. Variable code:

function () {
 var timezone = 'America/Argentina/Buenos_Aires'
 var localTime = new Date();
 var time = new Date(localTime.toLocaleString('en-US', {timeZone: timezone}));
 return time.getHours();
}

I have no errors in console and popup shows in any time.

I hope I was clear.

Best Regards.