• Resolved zo

    (@zotezo)


    Hi,
    I want to install other AMP addons like ads,AMP cache etc.

    Where to download that?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • <script data-ad-client=”ca-pub-7786984320926398″ async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script&gt;

    This is my Adsense account code

    Thread Starter zo

    (@zotezo)

    <script data-ad-client=”ca-pub-7786984320926398″ async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>

    Where you have added this code?

    Plugin Author Weston Ruter

    (@westonruter)

    You can find AMP-compatible ecosystem plugins here: https://amp-wp.org/ecosystem/plugins/

    We are going to be integrating the ecosystem plugin list into the theme/plugin install screens in WordPress. But for now you can use the plugin site.

    For example, to put add on your page the easiest way is to use Google’s Site Kit plugin.

    Please explain what you mean by an AMP Cache plugin. All valid AMP pages are cached by default by AMP Caches (e.g. Google’s).

    Thread Starter zo

    (@zotezo)

    In order to see page views,Sale tracking,page click in GA you have provided an area to add json code.I have added my code there but showing some error.can you please what’s wrong is going on..

    Do you provide any caching plugins for Amp only?

    Plugin Author Weston Ruter

    (@westonruter)

    Google’s Site Kit plugin also has Google Analytics integration which is easier than using the built-in JSON input form. Nevertheless, if you want to use the Analytics JSON text field in the plugin, what error are you seeing? What code are you trying to enter? There is some sample code on that page.

    AMP pages shouldn’t need any special caching treatment vs non-AMP pages. They’re just webpages. The WP Super Cache plugin is one option for general site caching. What specific functionality do you have in mind?

    Thread Starter zo

    (@zotezo)

    Hi,
    FOR GA codes for analytics tracking I have added this code but showing some error can you please check what is wrong?

    {
    “vars”:{
    “account”:”UA-xxxxxx-1″}
    ,”triggers”:{
    “trackPageview”:{
    “on”:”visible”,”request”:”pageview”}
    ,”trackEvent”:{
    “on”:”click”,”selector”:”.order,.purcbtn,.ebtn-link,.ebtn,.ele-s-sm”,”request”:”event”,”vars”:{
    “eventCategory”:”AMPBuyNow”,”eventAction”:”${
    eventAction}
    “,”eventLabel”:”${
    eventLabel}
    “}
    }
    }
    }
    Thanks

    Plugin Author Weston Ruter

    (@westonruter)

    Yes, that’s not valid JSON. There are JSON parse errors in it.

    This may work, though you will need to replace UA-xxxxxx-1 with your actual account ID of course:

    {
        "vars": {
            "account": "UA-xxxxxx-1"
        },
        "triggers": {
            "trackPageview": {
                "on": "visible",
                "request": "pageview"
            },
            "trackEvent": {
                "on": "click",
                "selector": ".order,.purcbtn,.ebtn-link,.ebtn,.ele-s-sm",
                "request": "event",
                "vars": {
                    "eventCategory": "AMPBuyNow",
                    "eventAction": "${eventAction}",
                    "eventLabel": "${eventLabel}"
                }
            }
        }
    }

    You can use a JSON validator tool to identify and fix syntax errors, a couple opens I found from Googling:

    https://jsonlint.com/
    https://jsonformatter.curiousconcept.com/
    https://jsonformatter.org/

    Thread Starter zo

    (@zotezo)

    Hi,
    Thanks for your correct codes.I have added your plugins in my site https://www.zotezo.com how to make sure Google will automatically detect my pages to be AMP.HOW to make sure amp pages are running properly? Any tools or mechanism?
    In case of invalid amp or pages has some errors that errors will be automatically deleted or need to delete manually?
    Thanks

    Plugin Author Weston Ruter

    (@westonruter)

    Google will automatically index the AMP pages when it crawls your site next. Each non-AMP page that has an AMP version will have an amphtml link in the page for search engines to index.

    For tools I recommend installing the AMP Validator extension: https://chrome.google.com/webstore/detail/amp-validator/nmoffdblmcmgeicmolmhobpoocbbmknc?hl=en

    It will provide you easy access to get to the AMP version and tell you if there are validation errors when on the AMP version. (Note: when logged-in the admin bar will cause a validation error which is expected.) Also use AMP validator to check individual URLs: https://validator.amp.dev/

    But the AMP plugin internalizes the validator, so you shouldn’t need to check this. The AMP plugin’s purpose is to prevent validation errors from leaking out onto the frontend so that search engines do not encounter invalid markup. The AMP plugin then alerts you to the problem so so you can fix it instead, or at least be aware that the invalid markup is being removed.

    Again, the AMP plugin tries to do everything automatically and it will never intentionally serve invalid AMP markup.

    Thread Starter zo

    (@zotezo)

    Hi Weston,
    We have created events for AMPBuyNow to track events for the medicine page (Buy Now) tracking this types of medicine pages https://www.zotezo.com/in/reviews/dolo-650mg-tablet/?amp
    Whats wrong with my codes? Why it is not tracked in GA?

    {
        "vars": {
            "account": "UA-xxxxxx"
        },
        "triggers": {
            "trackPageview": {
                "on": "visible",
                "request": "pageview"
            },
            "trackEvent": {
                "on": "click",
                "selector": ".order,.purcbtn,.ebtn-link,.ebtn,.ele-s-sm",
                "request": "event",
                "vars": {
                    "eventCategory": "AMPBuyNow",
                    "eventAction": "${eventAction}",
                    "eventLabel": "${eventLabel}"
                }
            }
        }
    }

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Other AMP plugin to install from where to get’ is closed to new replies.