AmpDetect

Summary: Detect AMP crawler bots so you can serve AMP pages, also to enable or disable recipes
Version: 20181128
Prerequisites: Any PmWiki Version
Status: Mantained
Maintainer: CarlosAB
License: GPL
Categories: Administration
Users: (view? / edit)
Discussion: AmpDetect-Talk?

Questions answered by this recipe

How can I detect when my website is been crawled by AMP bots?

Description

Recipe for detection of AMP crawler bots

Installation

Just add in your config:

include_once("$FarmD/cookbook/ampdetect.php");

Configuration

There is no confguration needed, but there is a variable to enable and disable detection and $IsAmp variable is set with either true or false.

Change log / Release notes

This will be integrated with OnEvent recipe as an OnAmp() function. where you can test the bots individually.

See Also

Comments

See discussion at AmpDetect-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.