amp-user-notification data-dismiss-href not firing
-
Hi!
I’m running into a strange issue trying to get the data-dismiss-href attribute on the amp-user-notification to work.
https://amp.dev/documentation/examples/components/amp-user-notification/This attribute allows you to, on tap of a button, call a custom POST endpoint. I have successfully set up the endpoint in WordPress, and it functions as I would expect when I go directly to it’s URL. However, when I specify the endpoint URL in the data-dismiss-href attribute, it never fires.
I am referencing the amp-user-notification js. I build the <amp-user-notification> tag within a function that is called using the ‘amp_post_template_footer’ filter. I’m wondering if I need to create the <amp-user-notification> tag in some other way or via some other filter maybe?
Any help would be appreciated.
Thanks,
Dan PThis is the code for the notification tag.
<amp-user-notification data-dimiss-href="/wp-json/myplugin/v1/endpoint" id="amp-user-notification1" layout="nodisplay" data-persist-dismissal="false" class="" role="alert" i-amphtml-fixedid="F0" style=""> This site uses cookies to personalize content. <a href="">Learn more.</a> <button on="tap:amp-user-notification1.dismiss">I accept</button> </amp-user-notification>
-
To help you we’d need to see a URL where the issue is occurring.
It’s also not clear if this is an issue with the AMP plugin specifically or an issue with AMP generally. If the latter, you’d be better off getting resources via https://amp.dev/support/
Here’s the full source code of the page:
<!doctype html> <html amp lang="en-US"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <title>JP & Associates REALTORS are full speed ahead</title> <link rel="canonical" href="https://local.inman.com/2019/05/06/jp-associates-realtors-are-full-speed-ahead/" /> <script type='text/javascript' src='https://cdn.ampproject.org/v0.js' async></script> <script type='text/javascript' src='https://cdn.ampproject.org/v0/amp-ad-0.1.js' async custom-element="amp-ad"></script> <script type='text/javascript' src='https://cdn.ampproject.org/v0/amp-user-notification-0.1.js' async custom-element="amp-user-notification"></script> <script type='text/javascript' src='https://cdn.ampproject.org/v0/amp-analytics-0.1.js' async custom-element="amp-analytics"></script> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <script type="application/ld+json">{"@context":"http:\/\/schema.org","publisher":{"@type":"Organization","name":"Inman","logo":{"@type":"ImageObject","url":"http:\/\/local.inman.com\/wp-content\/themes\/inman2\/images\/Inman__Large_Logo.png","height":48,"width":172}},"@type":"NewsArticle","mainEntityOfPage":"http:\/\/local.inman.com\/2019\/05\/06\/jp-associates-realtors-are-full-speed-ahead\/","headline":"JP & Associates REALTORS are full speed ahead","datePublished":"2019-05-06T07:01:34+00:00","dateModified":"2019-05-06T07:01:34+00:00","author":{"@type":"Person","name":"Dan Pagliarini"},"isAccessibleForFree":true,"image":{"@type":"ImageObject","url":"http:\/\/local.inman.com\/wp-content\/uploads\/2017\/01\/Inman_Default_Featured_Image-1984x880.png","width":1984,"height":880}}</script> <meta name="generator" content="AMP Plugin v1.2.0; mode=reader; experiences=website"><meta name="generator" content="WordPress 5.2.2" /> <style amp-custom> /* Generic WP styling */ .alignright { float: right; } .alignleft { float: left; } .aligncenter { display: block; text-align: center; margin-left: auto; margin-right: auto; } .amp-wp-enforced-sizes { /** Our sizes fallback is 100vw, and we have a padding on the container; the max-width here prevents the element from overflowing. **/ max-width: 100%; margin: 0 auto; } /* * Prevent cases of amp-img converted from img to appear with stretching by using object-fit to scale. * See <https://github.com/ampproject/amphtml/issues/21371#issuecomment-475443219>. * Also use object-fit:contain in worst case scenario when we can't figure out dimensions for an image. */ amp-img.amp-wp-enforced-sizes[layout="intrinsic"] > img, .amp-wp-unknown-size > img { object-fit: contain; } amp-fit-text blockquote, amp-fit-text h1, amp-fit-text h2, amp-fit-text h3, amp-fit-text h4, amp-fit-text h5, amp-fit-text h6 { font-size: inherit; } /** * Override a style rule in Twenty Sixteen and Twenty Seventeen. * It set display:none for audio elements. * This selector is the same, though it adds body and uses amp-audio instead of audio. */ body amp-audio:not([controls]) { display: inline-block; height: auto; } /* * Style the default template messages for submit-success, submit-error, and submitting. These elements are inserted * by the form sanitizer when a POST form lacks the action-xhr attribute. */ .amp-wp-default-form-message > p { margin: 1em 0; padding: 0.5em; } .amp-wp-default-form-message[submitting] > p, .amp-wp-default-form-message[submit-success] > p.amp-wp-form-redirecting { font-style: italic; } .amp-wp-default-form-message[submit-success] > p:not(.amp-wp-form-redirecting) { border: solid 1px #008000; background-color: #90ee90; color: #000; } .amp-wp-default-form-message[submit-error] > p { border: solid 1px #f00; background-color: #ffb6c1; color: #000; } /* Prevent showing empty success message in the case of an AMP-Redirect-To response header. */ .amp-wp-default-form-message[submit-success] > p:empty { display: none; } /* Template Styles */ .amp-wp-content, .amp-wp-title-bar div { margin: 0 auto; max-width: 600px; } html { background: #0a89c0; } body { background: #fff; color: #353535; font-family: Georgia, 'Times New Roman', Times, Serif; font-weight: 300; line-height: 1.75em; } p, ol, ul, figure { margin: 0 0 1em; padding: 0; } a, a:visited { color: #0a89c0; } a:hover, a:active, a:focus { color: #353535; } /* Quotes */ blockquote { color: #353535; background: rgba(127,127,127,.125); border-left: 2px solid #0a89c0; margin: 8px 0 24px 0; padding: 16px; } blockquote p:last-child { margin-bottom: 0; } /* UI Fonts */ .amp-wp-meta, .amp-wp-header div, .amp-wp-title, .wp-caption-text, .amp-wp-tax-category, .amp-wp-tax-tag, .amp-wp-comments-link, .amp-wp-footer p, .back-to-top { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif; } /* Header */ .amp-wp-header { background-color: #0a89c0; } .amp-wp-header div { color: #fff; font-size: 1em; font-weight: 400; margin: 0 auto; max-width: calc(840px - 32px); padding: .875em 16px; position: relative; } .amp-wp-header a { color: #fff; text-decoration: none; } .amp-wp-header .amp-wp-site-icon { /** site icon is 32px **/ background-color: #fff; border: 1px solid #fff; border-radius: 50%; position: absolute; right: 18px; top: 10px; } /* Article */ .amp-wp-article { color: #353535; font-weight: 400; margin: 1.5em auto; max-width: 840px; overflow-wrap: break-word; word-wrap: break-word; } /* Article Header */ .amp-wp-article-header { align-items: center; align-content: stretch; display: flex; flex-wrap: wrap; justify-content: space-between; margin: 1.5em 16px 0; } .amp-wp-title { color: #353535; display: block; flex: 1 0 100%; font-weight: 900; margin: 0 0 .625em; width: 100%; } /* Article Meta */ .amp-wp-meta { color: #696969; display: inline-block; flex: 2 1 50%; font-size: .875em; line-height: 1.5em; margin: 0 0 1.5em; padding: 0; } .amp-wp-article-header .amp-wp-meta:last-of-type { text-align: right; } .amp-wp-article-header .amp-wp-meta:first-of-type { text-align: left; } .amp-wp-byline amp-img, .amp-wp-byline .amp-wp-author { display: inline-block; vertical-align: middle; } .amp-wp-byline amp-img { border: 1px solid #0a89c0; border-radius: 50%; position: relative; margin-right: 6px; } .amp-wp-posted-on { text-align: right; } /* Featured image */ .amp-wp-article-featured-image { margin: 0 0 1em; } .amp-wp-article-featured-image amp-img { margin: 0 auto; } .amp-wp-article-featured-image.wp-caption .wp-caption-text { margin: 0 18px; } /* Article Content */ .amp-wp-article-content { margin: 0 16px; } .amp-wp-article-content ul, .amp-wp-article-content ol { margin-left: 1em; } .amp-wp-article-content .wp-caption { max-width: 100%; } .amp-wp-article-content amp-img { margin: 0 auto; } .amp-wp-article-content amp-img.alignright { margin: 0 0 1em 16px; } .amp-wp-article-content amp-img.alignleft { margin: 0 16px 1em 0; } /* Captions */ .wp-caption { padding: 0; } .wp-caption.alignleft { margin-right: 16px; } .wp-caption.alignright { margin-left: 16px; } .wp-caption .wp-caption-text { border-bottom: 1px solid #c2c2c2; color: #696969; font-size: .875em; line-height: 1.5em; margin: 0; padding: .66em 10px .75em; } /* AMP Media */ .alignwide, .alignfull { clear: both; } amp-carousel { background: #c2c2c2; margin: 0 -16px 1.5em; } amp-iframe, amp-youtube, amp-instagram, amp-vine { background: #c2c2c2; margin: 0 -16px 1.5em; } .amp-wp-article-content amp-carousel amp-img { border: none; } amp-carousel > amp-img > img { object-fit: contain; } .amp-wp-iframe-placeholder { background: #c2c2c2 url( https://local.inman.com/wp-content/plugins/amp/assets/images/placeholder-icon.png ) no-repeat center 40%; background-size: 48px 48px; min-height: 48px; } /* Article Footer Meta */ .amp-wp-article-footer .amp-wp-meta { display: block; } .amp-wp-tax-category, .amp-wp-tax-tag { color: #696969; font-size: .875em; line-height: 1.5em; margin: 1.5em 16px; } .amp-wp-comments-link { color: #696969; font-size: .875em; line-height: 1.5em; text-align: center; margin: 2.25em 0 1.5em; } .amp-wp-comments-link a { border-style: solid; border-color: #c2c2c2; border-width: 1px 1px 2px; border-radius: 4px; background-color: transparent; color: #0a89c0; cursor: pointer; display: block; font-size: 14px; font-weight: 600; line-height: 18px; margin: 0 auto; max-width: 200px; padding: 11px 16px; text-decoration: none; width: 50%; -webkit-transition: background-color 0.2s ease; transition: background-color 0.2s ease; } /* AMP Footer */ .amp-wp-footer { border-top: 1px solid #c2c2c2; margin: calc(1.5em - 1px) 0 0; } .amp-wp-footer div { margin: 0 auto; max-width: calc(840px - 32px); padding: 1.25em 16px 1.25em; position: relative; } .amp-wp-footer h2 { font-size: 1em; line-height: 1.375em; margin: 0 0 .5em; } .amp-wp-footer p { color: #696969; font-size: .8em; line-height: 1.5em; margin: 0 85px 0 0; } .amp-wp-footer a { text-decoration: none; } .back-to-top { bottom: 1.275em; font-size: .8em; font-weight: 600; line-height: 2em; position: absolute; right: 16px; } .graphiq-amp-iframe { background: #fff; } .graphiq-amp-link { text-align: center; } .graphiq-amp-link a { font:14px/16px arial;color:#3d3d3d; } /* This CSS resource incorporates links to font software which is the valuable copyrighted property of WebType LLC, The Font Bureau and/or their suppliers. You may not attempt to copy, install, redistribute, convert, modify or reverse engineer this font software. Please contact WebType with any questions: www.webtype.com */ body:after { content: ''; background-image: url(//pls.webtype.com/v.gif?ct=239744,239741,239745,239742,239752,239740,239743,239743,239742,239744,239752,239741,239745,239740,239752,239745,239744,239743,239741,239742,239740,239741,239752,239740,239742,239744,239745,239743&r=102239&p=96876&h=4lbfv7%2fc7I4gH8SCuyufrg%3d%3d); } /*** footer notification ***/ .sitewide-announcement { font-family: "Balto Book", Helvetica, Arial, sans-serif; width: 100%; text-align: center; padding: 15px 10px; position: -webkit-sticky; position: sticky; left: 0; bottom: 0; z-index: 99999; display: none; } .sitewide-announcement.alert { background-color: #faf5a8; } .sitewide-announcement.alert a { color: #070606; } .sitewide-announcement.alert .button { background: #070606; color: #faf5a8; } .sitewide-announcement.alert #announcement-close { color: #070606; } .sitewide-announcement.reminder { background-color: #5cb3e2; } .sitewide-announcement.reminder a { color: #ffffff; } .sitewide-announcement.reminder .button { background: #ffffff; color: #5cb3e2; } .sitewide-announcement.reminder #announcement-close { color: #ffffff; } .sitewide-announcement.problem { background-color: #070606; } .sitewide-announcement.problem a { color: #f4053e; } .sitewide-announcement.problem .button { background: #f4053e; color: #070606; } .sitewide-announcement.problem #announcement-close { color: #f4053e; } .sitewide-announcement a { text-decoration: none; display: block; } .sitewide-announcement .text { display: block; font-family: "Balto Bold", Helvetica, Arial, sans-serif; line-height: 1.3rem; } .sitewide-announcement .button { font-family: "Balto Bold", Helvetica, Arial, sans-serif; text-transform: uppercase; padding: 12px 17px 11px; margin-left: 0; width: auto; display: inline-block; border-radius: 5px; margin-top: 12px; } .sitewide-announcement .announcement-close { position: absolute; top: 2px; right: 8px; font-size: 25px; font-weight: 400; cursor: pointer; } html.fixed .sitewide-announcement { z-index: 999; } @media (min-width: 650px) { .sitewide-announcement .text { display: inline-block; margin-right: 1.5rem; } .sitewide-announcement .button { margin-top: 0; margin-left: 12px; } } /*# sourceMappingURL=maps/notification.css.map */ /*overwrite notificaton_css*/ .sitewide-announcement { display:block; max-width: calc(100% - 20px); } .amp-wp-header { background: #000; } .amp-wp-header a { background-image: url( 'https://local.inman.com/wp-content/themes/inman2/dist/images/logo.png' ); background-repeat: no-repeat; background-size: contain; display: block; height: 28px; width: 94px; margin: 0 auto; text-indent: -9999px; } .amp-wp-comments-link a, .amp-wp-meta.amp-wp-tax-category, .amp-wp-meta.amp-wp-tax-tag { display: none; } .jwWrapper { position: relative; padding-bottom: 56.25%; margin-bottom: 10px; height: 0; overflow: hidden; } .jwWrapper amp-iframe { width: 100%; margin-left: 0px; } .amp-article-block{ position: relative; width: 100%; } .amp-ism-article-block-inner { position: relative; z-index: 3; width: 100%; } .amp-ism-article-block-top { width: 100%; background: url(https://local.inman.com/wp-content/plugins/inman-select-membership/img/global/overlay.png) no-repeat left top; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; height: 135px; position: absolute; left: 0; top: -135px; } .amp-ism-article-block-content { padding: 24px 4%; border-bottom: 4px solid #3aabf1; border-top: 4px solid #3aabf1; background: white; } .amp-ism-article-block-title{ font-size: 18px; line-height: normal; margin-bottom: 20px; text-align: center; font-family: Helvetica; font-weight: bold; } a.amp-ism-pid-link, a.amp-ism-pid-link:hover, a.amp-ism-select-link, a.amp-ism-select-link:hover{ height: 39px; line-height: 39px; font-size: 18px; margin: 0 auto; display: block; width: 100%; max-width: 320px; font-size: 18px; text-align: center; color: #ffffff; background: #98bf4a; text-transform: uppercase; text-decoration: none; font-family: Helvetica; font-weight: bold; } a.amp-ism-select-link, a.amp-ism-select-link:hover{ border: 1px solid #98bf4a; background: white; color: #98bf4a; } .amp-ism-paywall-footnote { font-size: 10px; line-height: normal; text-align: center; color: #232323; margin: 11px 0 22px; font-family: Helvetica; } .amp-ism-separator { height: 1px; width: 100%; background: rgba(151, 151, 151, 0.53); } .amp-ism-bottom-line { margin: 22px 0 0; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 121%; text-align: center; color: #232323; font-weight: bold; } .amp-ism-bottom-line a, .amp-ism-bottom-line a:hover{ color: #98bf4a; font-weight: bold; text-decoration: none; } </style> </head> <body class=""> <header id="top" class="amp-wp-header"> <div> <a href="https://local.inman.com/"> <span class="amp-site-title"> Inman </span> </a> </div> </header> <article class="amp-wp-article"> <header class="amp-wp-article-header"> <h1 class="amp-wp-title">JP & Associates REALTORS are full speed ahead</h1> <div class="amp-wp-meta amp-wp-byline"> <amp-img src="https://0.gravatar.com/avatar/6bd1fb1a02ab11e91d4ed9baec5d42cc?s=24&d=mm&r=g" alt="Dan Pagliarini" width="24" height="24" layout="fixed"></amp-img> <span class="amp-wp-author author vcard">Dan Pagliarini</span> </div> <div class="amp-wp-meta amp-wp-posted-on"> <time datetime="2019-05-06T00:01:34+00:00"> 1 year ago </time> </div> </header> <div class="amp-wp-article-content"> <p><em>One of America’s fastest growing brokerages is poised to be one of America’s fastest growing franchisors. Why and how is this even possible?</em></p> <p><em>We asked one of its franchisees to give us some insights:</em></p> <p>Recently, I read an article about choosing the right brokerage. It explained why brokerages are geared for agents at various stages of their careers. As I read, I didn’t understand why this was the standard. Why do you have to pick a brokerage to get started, move to another to help you grow, and yet another for you to be successful? Shouldn’t your brokerage evolve to support you at any stage of your career?</p><center><amp-ad width="300" height="250" type="doubleclick" data-slot="/1018828/AMP_Mobile_ATF_1" json='{"targeting":{"pid":["732071"]}}'></amp-ad></center> <p>As a former agent, and now owner, I’m uniquely positioned to recognize the change agents want to see. Therefore when I was looking for a franchise partner, I was excited to connect with JP & Associates REALTORS? (JPAR).</p> <p>JPAR founder, JP Piccinini, has established a culture that is agent-centric. As a former top-producer, he built a company based on what agents wanted… and then he did it for franchisees. Same formula: agents first and franchisees first.</p> <p>When I decided to open a real estate brokerage, I knew we had to have something fresh—a partner company that embraced the same ideas about fees, training, support, and culture. JPAR checked all of the boxes. They are a full-service brokerage on a transactional fee model. Brick and mortar offices plus all this:</p> <p><strong>1. BOSSS Hub</strong></p> <p>JPAR constantly brings the latest and greatest tools from vendor partners to their agents. Starting with B.O.S.S.S., the Broker One Stop Shop System that houses everything you need to do business. It’s a direct portal to each resource the company offers. Truly industry leading.</p> <p><strong>2. Agent Health Care/Retirement Bonus Plan</strong></p> <p>When was the last time you signed up for health care through your brokerage or received retirement bonuses? JPAR is changing the game on that. Offering health care plans that make sense to agents and are truly affordable.</p> <p><strong>3. Technology</strong><br> ?<br> JPAR doesn’t need to join the hype about being a technology company. It is a real estate company focused on keeping the main thing the main thing: selling real estate. It provides best in class tech to its agents and franchisees giving us an opportunity every day to grow our business.</p> <p><strong>4. Training</strong></p> <p>JPAR’s innovative training tracts that can be tailored to any agent at any stage of their career is nothing short of genius. Hundreds of trainings a month are offered. It’s a massive amount of quality, current and relevant educational material for agents.</p> <p><strong>5. Support</strong></p> <p>As I was doing research on franchises, I learned it was a hands-off approach for most. ‘Here’s your brand box, go recruit and good luck,’ they’d say. As JPAR franchisees, we are truly supported in all aspects of our business. From recruiting, retention and of course generating revenue.</p> <p>All of this while maintaining a transactional model with a productivity standard to ensure they are hiring serious agents.</p> <p>JPAR provides franchisees a brokerage in a box set up that includes:</p> <ul><li>Training and tools for recruiting</li> <li>Industry-leading technology</li> <li>Discounts and supplier networks</li> <li>Training and centralized support</li> <li>Accounting and compliance processing</li> </ul><p>And this is just today. They are always evolving and open to ideas to make the brokerage better like the recent rollout of its own ibuyer platform, Instant Offers.</p> <p>JP is always bringing in the latest technology to give JPAR a competitive advantage. His history as an agent shows in his leadership and it trickles down to the entire staff of the company. When he was laying the groundwork for JPAR, he wanted to build a company that focuses on providing agents with the resources and support it takes to be successful. JP’s vision of what a brokerage should be is evident even into the franchise level.</p> <p>So, what’s next? JP & Associates REALTORS corporate-owned stores and its to 2,000 agents are already the largest Independent privately held brokerage in Texas for homes sales in just 7 short years. The plan is 50 states by 2023. I am on board this ship and I bet we will get there by 2022.</p> <p><a href="https://careers.jpar.net/franchising/#logoPopup1" target="_blank" rel="noopener noreferrer">Learn more about getting onboard with JP & Associates REALTORS</a>.</p> </div> <footer class="amp-wp-article-footer"> <div class="amp-wp-meta amp-wp-tax-category"> Categories: <a href="https://local.inman.com/category/brokerage/" rel="category tag">Brokerage</a>, <a href="https://local.inman.com/category/sponsored/" rel="category tag">Sponsored</a> </div> <div class="amp-wp-meta amp-wp-tax-tag"> Tags: <a href="https://local.inman.com/tag/agent-benefits/" rel="tag">agent benefits</a>, <a href="https://local.inman.com/tag/agent-recruitment/" rel="tag">agent recruitment</a>, <a href="https://local.inman.com/tag/agent-training/" rel="tag">agent training</a>, <a href="https://local.inman.com/tag/brokerage-benefits/" rel="tag">brokerage benefits</a>, <a href="https://local.inman.com/tag/brokerage-recruiting/" rel="tag">brokerage recruiting</a>, <a href="https://local.inman.com/tag/jp-associates-realtors/" rel="tag">JP & Associates Realtors</a>, <a href="https://local.inman.com/tag/jp-associates-realtors-are-full-speed-ahead/" rel="tag">JP & Associates REALTORS are full speed ahead</a>, <a href="https://local.inman.com/tag/jp-and-associates-real-estate/" rel="tag">JP and Associates Real Estate</a>, <a href="https://local.inman.com/tag/jpar/" rel="tag">JPAR</a>, <a href="https://local.inman.com/tag/real-estate-franchises/" rel="tag">Real estate franchises</a> </div> <div class="amp-wp-meta amp-wp-comments-link"> <a href="https://local.inman.com/2019/05/06/jp-associates-realtors-are-full-speed-ahead/#respond"> Leave a Comment </a> </div> </footer> </article> <center><amp-ad width=300 height=250 type="doubleclick" data-slot="/1018828/Article_300x250_Mobile_Bottom_2" json='{"targeting":{"pid":["732071"]}}'> </amp-ad></center><amp-user-notification data-dimiss-href="/wp-json/myplugin/v1/endpoint" id="amp-user-notification1" layout="nodisplay" data-persist-dismissal="false"> This site uses cookies to personalize content. <a href="">Learn more.</a> <button on="tap:amp-user-notification1.dismiss">I accept</button> </amp-user-notification> </body> </html>
- The topic ‘amp-user-notification data-dismiss-href not firing’ is closed to new replies.