• Resolved paul buxbaum

    (@paul-buxbaum)


    Component Script Support -> amp-geo -> not present

    Using latest version (.71) of amp plugin, amp-consent can be loaded as script callout within <head> tag. This is done via amp_post_template_data filter by extending array $data
    Example:
    $data[‘amp_component_scripts’][‘amp-consent’] = ‘https://cdn.ampproject.org/v0/amp-consent-0.1.js&#8217;;

    but adding amp-geo fails (and is sanitized/stripped)
    $data[‘amp_component_scripts’][‘amp-geo’] = ‘https://cdn.ampproject.org/v0/amp-geo-0.1.js&#8217;;

    looks like amp-geo is missing from class-amp-allowed-tags-generated.php
    AMP_Allowed_Tags_Generated

    Google has an example code where amp-geo is used w/ amp-consent for GDPR compliance.
    But amp-geo js script cannot be loaded using standard facilities.

    Is this going to be added?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Component Script Support -> amp-geo -> not present’ is closed to new replies.