Marfeel Garda Splits

Depending on where a user comes from, there are different types of Marfeel Garda code to resolve the site the user sees - the publisher's desktop site or their Marfeelized mobile site - by sending the relevant information to Marfeel to make this decision. 

Each Garda code is explained in further detail in the following.

GardaMarfeel

GardaMarfeel is executed when a user accesses a Marfeelized mobile site directly from Marfeel servers according to the following. This could be the case when viewing a demo or a Marfeel PWA (Progressive WebApp) that hasn't been activated yet:

  1. If the query string marfeelgarda=off is present, the user stays on the customer's Marfeel mobile site.
  2. The device the user is on is identified. If the device is supported, the next step is executed and the version to display (smartphone or tablet) is determined. If the device is not supported, the user is redirected back to the URL specified for an unsupported device. 
  3. The MarfeelGarda cookie is read.
  4. If it doesn't exist or has a value of NO, the MarfeelGarda cookie with a value of YES is created with an expiration of 15 days, along with the MarfeelKrks cookie with a value of 0, and the user stays on the Marfeelized site.  
  5. If the MarfeelGarda cookie has a value of YES, the MarfeelKrks cookie is inspected to see if its value is >=5.
  6. If FALSE, the user stays on theMarfeelized site.
  7. If TRUE, the MarfeelKrks cookie is destroyed and the MarfeelGarda=NO cookie is set with an expiration of 15 days and the user is redirected to the publisher's site.

    The MarfeelKrks cookie identifies how many times the user has clicked an external link to leave the Marfeel version. In this case, if the cookie has a value greater than or equal to 5, the user is automatically directed to the publisher's desktop site until its expiration date.

GardaB and GardaC

GardaB or GardaC is executed when a user accesses a Marfeel PWA on the client-side when a publisher's Marfeel solution has been activated. It determines whether to keep the user on the customer's desktop site or redirect them to their Marfeel mobile site according to the following:

  1. If the query string marfeelgarda=off is present, the user is redirected to the Marfeel version.
  2. The device the user is on is identified. If the device is supported, the next step is executed. If the device is not supported, the user stays on the customer's desktop site. 
  3. If the query string fromt=yes is present, GardaB or GardaC sets the FromMarfeel cookie with a YES value and an expiration of 30 minutes.

  4. The FromMarfeel cookie is read. If it exists and has a value of YES, the user stays on the publisher's site.
  5. The MarfeelGarda cookie is read. 
  6. If the MarfeelGarda cookie doesn't exist or has a NO value, the user is redirected to the Marfeel version.
  7. If the MarfeelGarda cookie has a YES value, the user stays on the publisher's site.