Navigation loop for Swipeable Gallery

134 views
Skip to first unread message

Ramon

unread,
Apr 26, 2018, 4:33:54 PM4/26/18
to Google Web Designer beta
Hi,

I have a dynamic swipeable gallery that has two navigation arrows on both sides controlling the left and right function.


My question is, is there a way to set up the arrows (especially the right arrow) that when the user clicks to the last panel of the gallery, it would go (loop) back again to the first panel?  Hoping that anyone here can help me.  Thank you!

Best Regards,

Ramon Reyes

Kent

unread,
Apr 26, 2018, 5:27:58 PM4/26/18
to Google Web Designer beta
You can do this with some custom javascript which keeps track of the current item and total items, and then if the next item is greater than the total then it uses the gallery goToFrame action instead of goForwards. You can see an example in the GWD Template >  Dynamic Remarketing for Adwords > #8 Dynamic Remarketing with Headline and Single CTA Button.

Hope that helps,

Kent
Google Web Designer team

Ramon

unread,
May 7, 2018, 3:53:59 PM5/7/18
to Google Web Designer beta
Hi Kent,

Thank you for this!  I actually tried copying how they did on the sample you had mentioned, but it doesn't seem to work.  I'm not a coder, so trying to understand what is written in the script is pretty much greek to me.  I may have missed something . :(  Is there another alternative without using custom codes for this?  

Best Regards,

Ramon Reyes

Kent

unread,
May 7, 2018, 4:52:12 PM5/7/18
to Google Web Designer beta
Unfortunately that is a custom use case which does require some coding experience to add from scratch.

Is it possible to start with that template that has this functionality and then edit the content to meet your design?

Are you publishing to AdWords? The 5 files in the "common" folder are required, and the names of the gallery and arrows must match exactly those names used in the example template.

Ramon

unread,
May 8, 2018, 1:04:21 PM5/8/18
to Google Web Designer beta
Hi Kent,

Unfortunately, we're publishing it on Doubleclick. I understand.  I just wish there was an easier way to do the navigation without having to resort to custom codes. Thank you so much!

Best regards,

Ramon

Kent

unread,
May 8, 2018, 1:41:06 PM5/8/18
to Google Web Designer beta
Thanks for the feedback. Documenting this use case is on the roadmap and I hope to add step-by-step instructions to our Help Docs. We just added documentation last week on setting up dynamic exits for galleries in Studio (another common ask on this forum) https://support.google.com/webdesigner/answer/6321678#exits

Hope that helps,

Ramon

unread,
May 9, 2018, 11:00:32 AM5/9/18
to Google Web Designer beta
Thanks for this Kent!

I noticed that you are using the PluckandJoin Key option to call for the dynamic URLs.

Honestly, I don't understand what its for (again, not a coder, so i really don't understand what was being explained in the help section).

What we did is basically what I have below:


Now, I'm not sure if what we did is the correct way though, will this be hurting tracking of clicks and stuff? Is what you were mentioning the best one in order to keep track of dynamic url exits?  I hope i'm saying this correctly. :(

Hope you can explain this a bit more.  Thank you.

Best Regards,

Ramon

Kent

unread,
May 9, 2018, 2:44:04 PM5/9/18
to Google Web Designer beta
I think your approach looks good too... probably just another way of doing it. Nothing specific to click tracking that I am aware of, but please let me know if you experience any issues. One reason we used Exit URLs is it's common to both platforms while Exit override is only DoubleClick.

Ramon

unread,
May 9, 2018, 4:20:30 PM5/9/18
to Google Web Designer beta
Oohh. I see. Well, once we have it up and running, that's probably the only time we will find out if its working or not. ;)  Thanks again!
Reply all
Reply to author
Forward
0 new messages