Giter Site home page Giter Site logo

web_modals's Introduction

web_modals

enabling modals in website

Project Objective

Every website has cookies system, and website has to show an notification about the cookies policy that website uses for its users so for that, website shows the notification about the cookies policy once on any page that tha user has visited and not every time the page reloads and also not on a certain page but on each page that website has but only once.

We can accomplish this objective using the lessons we learned in the brandflow about the page url, we can set the starting of the page url and then show our new users the cookie policy once on each url of our website.

Creating cookie modal

Goto sidenav > modals > lists. Click on add button and name our modal Cookie modal and select Show only once, this is obvious because we want to show our modal only once. Paste the code from cookie_info.html and paste in the code section of our modal, save the modal.

Creating trigger

Once our modal is created we need a condition for triggering the modal, the condition is simply the new user condition which has page url for localhost, save and publish changes.

Testing

Refresh the browser and you will see the cookie button and info, refresh the browser again, this time you will not see the cookie bar.

Creating scroll condition

If a user visites your website and starts reading article, then we would want to suggest him more articles that are related to the current one but only if the user has shown interest in that current article, this thing can be achieved with scroll condition

If the user has scrolled more than 60% of the article than we will show him more articles.

Goto automation > condition and then create a new rule named Scroll 60% condition and select type = Scroll % equals 60 and then save.

Creating related article modal

Goto modals > lists. Create new modal named Related article modal and paste the related_ article.html code in the code section and save it > add trigger and select condition to scroll 60% > save > publish changes.

Creating time delay condition

Many users just scroll down the page very quickly finding the thing they want in the article and not read the whole article for that we can set the time spent by the user on the website.

We create the Delay time condition from automation > condition > new rule > Delay 20 condition > type: Delay time = 20 > "Do something if user spents 20 seconds on the page".

Add the trigger to the modal Delay 20 and save it.

web_modals's People

Contributors

alexmhack avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.