Since the Covid-19 pandemic hit South Africa, Swipe ix has been looking at all the little ways in which we as a company can do our part in assisting the South African online industry to cope with the current global crisis we find ourselves in. The South African government recently announced that all .co.za domains are required to have a Covid-19 banner present on their websites to combat fake news and assist website visitors in obtaining information regarding the Covid-19 crisis. Swipe immediately grasped this opportunity to develop a simpler version of the government banner, which can be implemented without the assistance of a developer, making it easier for companies to comply with the recent government mandate.
The government provided banner code can be tricky to implement and requires the assistance of a developer, which most companies do not have access to during the lockdown.Swipe iX originally developed the single-line code to aid our clients during the Covid-19 crisis. Numerous clients requested an alternative to the government issued Covid-19 banner, which resulted in Swipe iX developing the GTM compatible code, now available to the general public.
Our banner is less intrusive than the banner provided by the government, offers website visitors the option to close the banner if it obstructs website content, and it's a mere single line of code that wouldn't require source code updates or deployments to activate.“Swipe’s version of the Covid-19 banner allows companies to comply with government regulations, whilst mitigating the banner influence on the overall user experience,” says Deon Heunis, Chief Technical Officer at Swipe iX. “Our banner design is neat and to the point, does not obstruct the website content and offers users the option to close the banner window if it proves disruptive to their original website visit intent.”
After Swipe iX carefully analysed the government issued banner code, the need for a simpler, single line code, which can be implemented by anybody, became a clear way of helping the online community comply with the government mandate. The nature of the code developed by Swipe differs from the government issued code in that the generated HTML is contained in the Javascript file whereas the gov code is a raw HTML file which could lead to errors during implementation if any of the code were to be copied incorrectly
1. Navigate to your Google Tag Manager account and click on the container (website) that you want to add the banner to.
2. Select the “Add a New Tag” option.
3. Click on “tag Configuration” and select the “Custom HTML” option.
4. Copy and paste the swipe code into the HTML field: <script id="swipe-covid-banner" src="https://swipeinc.github.io/covid-19-banner/covid-19-alert.js" async></script>
5. Select the “Triggering” setting and select “All Pages” to ensure that the banner appears on every webpage on your website.
6. Save the tag and rename it to “Covid-19 Banner”. Be sure to publish the container after completing the steps above to ensure that your new tag is saved and added to your website.
Swipe iX developed the Covid-19 banner code with the sole purpose of assisting South Africans and alleviating a small portion of the pressure felt by businesses during these tough times. As such, the single line of code is completely free, with no strings attached, and anyone can make use of it. If you struggle with implementation or have any questions, get in touch! We’re more than happy to assist in any way we can. Be sure to share this useful article with your company and fellow South Africans - you never know who might benefit from it.