To increase your website’s responsiveness and the usability of its webpages for mobile device users while analyzing your website visitors and their behaviors, Personalization supports the use of Accelerated Mobile Pages (AMP).
To serve personalized content with AMP, you must use the Using the Personalization APIs or its software development kit (SDK) to create the personalized content and serve the entire webpage to AMP with the personalized content included (as AMP doesn’t support the modification of pages with custom JavaScript).
Enabling AMP
To enable Personalization to use AMP with one of your Drupal websites, complete the following steps:
After enabling the module, you must disable New Relic on pages served through Google AMP.
Basic Google AMP cache usage
After you have enabled AMP for your website, you must include HTML code on relevant pages pointing to an AMP proxy for serving content to visitors. To do this, Personalization provides specific support for Google AMP Cache.
To enable webpage analytics, be sure to include the following AMP analytics script in a webpage’s header tag before you include the general AMP script.
Use the following example to help you use AMP with your website and its content.
Sending a custom event
The following example configures AMP to use a subscriber-specific event type when the user clicks on an element that’s identified by the CSS ID #test1.
To increase your website’s responsiveness and the usability of its webpages for mobile device users while analyzing your website visitors and their behaviors, Personalization supports the use of Accelerated Mobile Pages (AMP).
To serve personalized content with AMP, you must use the Using the Personalization APIs or its software development kit (SDK) to create the personalized content and serve the entire webpage to AMP with the personalized content included (as AMP doesn’t support the modification of pages with custom JavaScript).
Enabling AMP
To enable Personalization to use AMP with one of your Drupal websites, complete the following steps:
After enabling the module, you must disable New Relic on pages served through Google AMP.
Basic Google AMP cache usage
After you have enabled AMP for your website, you must include HTML code on relevant pages pointing to an AMP proxy for serving content to visitors. To do this, Personalization provides specific support for Google AMP Cache.
To enable webpage analytics, be sure to include the following AMP analytics script in a webpage’s header tag before you include the general AMP script.
Use the following example to help you use AMP with your website and its content.
Sending a custom event
The following example configures AMP to use a subscriber-specific event type when the user clicks on an element that’s identified by the CSS ID #test1.