<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Senning Luk on Medium]]></title>
        <description><![CDATA[Stories by Senning Luk on Medium]]></description>
        <link>https://medium.com/@senning?source=rss-6421c338f255------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*21iT7JYO4a7GNNfELLApNw.jpeg</url>
            <title>Stories by Senning Luk on Medium</title>
            <link>https://medium.com/@senning?source=rss-6421c338f255------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:51:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@senning/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Mystery of the Zombie GTM Tag]]></title>
            <link>https://medium.com/@senning/the-mystery-of-the-zombie-gtm-tag-60b32e7a1a44?source=rss-6421c338f255------2</link>
            <guid isPermaLink="false">https://medium.com/p/60b32e7a1a44</guid>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[google-analytics]]></category>
            <dc:creator><![CDATA[Senning Luk]]></dc:creator>
            <pubDate>Tue, 27 Nov 2018 00:06:10 GMT</pubDate>
            <atom:updated>2018-11-27T00:06:10.723Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Or: what to do when a blocking trigger doesn’t block the tag</em></h4><p><a href="#1cd8">Skip to <strong>the solution</strong> if you don’t want the backstory</a></p><p>I was setting up some GTM tags for a client that had a few subdomains all running on the same Google Tag Manager account, and I was asked to split one subdomain off in to its own Analytics property. There was a Page View tag set up to fire on every page view and I knew exactly what I had to do:</p><ol><li>I needed to create a trigger for the subdomain to fire my new Page View tag,</li><li>I could then use that same trigger to block the original Page View</li></ol><p>Easy peasy, two minutes and I had everything set up ready to test. A test that I was 100% confident would definitely show my new tag and <em>definitely not</em> show my <em>Boring old tag</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aijEDObbpy2DtH3CoiY0fw.png" /><figcaption>A screenshot from a Google Tag Manager preview showing the Boring Old Tag <em>definitely firing.</em></figcaption></figure><p>But there it was. Maybe I didn’t set up the blocking trigger correctly?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*QHkjsZD4TFD3-zBPV2WzIA.png" /><figcaption>A screenshot from Google Tag Manager preview showing that I had set up the blocking trigger correctly.</figcaption></figure><p>I pored over all of my settings in GTM and everything the Preview screen showed me but everything looked fine. Except that no matter what I did, the <em>Boring old tag</em> kept firing. In fact, even if I removed <em>all of the triggers</em> the tag still fired.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aijEDObbpy2DtH3CoiY0fw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o917v_gIYDccMWiLGn7edA.png" /><figcaption>Boring old tag with no Firing Triggers, and yet still fired.</figcaption></figure><p>This was when I knew I wasn’t dealing with any normal tag, I was dealing with <strong>an invincible zombie tag</strong>. And as I started to wonder what rattling distraction, what delectable bait, what sacrificial web developer I could throw at it so I could get away, I noticed something at the bottom of the tag triggers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XhOKs4naTPQUiEKeszKPjQ.png" /><figcaption>The triggers for the “Boring old tag”, with a section labelled “Your tag will fire right before these tags”</figcaption></figure><p>And when does <em>Sneaky sequenced tag</em> fire? On every page view. And with that, the solution was obvious: add an Exception Trigger on <em>that</em> tag so that it doesn’t then drag the <em>Boring old tag </em>on to the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLr7w6eM1bsW2Ry_vq76GA.png" /><figcaption>A screenshot from Tag Manager showing the original exception added to the “Sneaky sequenced tag”</figcaption></figure><p><strong>Why this was hard</strong></p><p>Google Tag Manager has made huge strides in the past few years and I think it’s a great tool for lots of site owners or marketing team members who don’t want to learn code (or for web developers who want to work with them/hand over an easy-to-administer tool to them). While it can get overwhelming, it generally does a great job of showing exactly what’s happening and why. I think this was a — rare — exception.</p><p>To me, if <em>Tag A is blocking Tag B</em>, then <em>Tag C</em> shouldn’t just be able to push through that block. I don’t have enough experience with Tag Sequencing to say whether it’s right that sequenced tags override exception triggers — I imagine it’d be frustrating to have a tag mysteriously <em>not fire</em> too.</p><p>But if that’s how tags should work, then the GTM Preview pane (or Tag Assistant) should show why.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60b32e7a1a44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coordinating your scrappy political campaign’s volunteers with Google Sheets]]></title>
            <link>https://medium.com/@senning/coordinating-your-scrappy-political-campaigns-volunteers-with-google-sheets-6d0058898d77?source=rss-6421c338f255------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d0058898d77</guid>
            <category><![CDATA[google-sheets]]></category>
            <category><![CDATA[political-campaigning]]></category>
            <dc:creator><![CDATA[Senning Luk]]></dc:creator>
            <pubDate>Thu, 13 Sep 2018 21:17:09 GMT</pubDate>
            <atom:updated>2018-09-13T21:17:09.651Z</atom:updated>
            <content:encoded><![CDATA[<p>When you’re just starting as a progressive campaign, sometimes you need a cheap and easy way keep track of them. I built a Google Sheet to help, which includes:</p><ol><li>A template for a week-by-week schedule which helps keep everyone’s details straight</li><li>A Google Script to send out reminder emails to tomorrow’s volunteers, with a totally customizable template and easy-to-use mail-merge features</li><li>A reporting feature to find your most dedicated volunteers</li></ol><p>I’ll expand on each feature below, but if you want to just get to it you can <a href="https://docs.google.com/spreadsheets/d/1nw1z3AXUhXaB-zY-e-nBvGdA0P4a4LRzhY6f5_pQ8HA/edit?usp=sharing">make a copy of the sheet here</a> (once it’s loaded, go to File &gt; Make a Copy). And if all you need is the script, here’s a <a href="https://gist.github.com/senning/a0af54863c07eb47a10145feac067416">Gist for it</a> (it’ll also carry over if you Make a Copy of the whole spreadsheet).</p><h3><strong>Weekly Schedule</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e6MGOu87GYezAv8wsq2rhA.png" /><figcaption>An example day on the spreadsheet, with columns for shift time, volunteer name, no-show/cancellation, completed shift, and volunteer’s email address (and a big Send button which will make sense in the next section).</figcaption></figure><p>This is just a nicely formatted example for a schedule, plus it lays the groundwork for everything else to follow. In this sheet, you get everything that you need to know about your volunteers on the day of their shift: who they are, when they’re coming in, and how to get in touch, and space for taking attendance (and check out the emoji — they let us shrink the attendance to the appropriate size, and they’re colourful too!). Make a copy of this sheet for every week of your campaign.</p><p><em>Tip</em>: Freezing the top rows keeps things organized even on days where you have a few screenfuls of volunteers <em>plus</em> it also lets you use the Sort feature without messing up your headers. Here’s a process to keep volunteers committed for their next shift:</p><ol><li>Ask your volunteers to commit to their next shift as they’re leaving for the day and just add it to the end.</li><li>At the start of the day, just use Sort on the time column to get a chronological list of your volunteers for the day.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*BvDlISWVT7mbtthf9KiKcg.png" /><figcaption>To sort the column, hover over the label (“B”), click on the arrow that pops up, then click “Sort sheet A -&gt; Z”</figcaption></figure><p>Google’s sorting function is really meant for text and doesn’t work perfectly for North American times. It will work much better if you 1. use (international/military-style) 24-hour time, or 2. schedule all your work in the afternoon, or 3. start the time with AM/PM, i.e. <strong>AM 9:00</strong><em> </em>or <strong>PM 4:30</strong>.</p><h3><strong>Shift Sender</strong></h3><p>Here’s where the magic starts: Included is an adapted Google Script which is set up to make it easy to email a reminder to your volunteers on the day before their shift. Once it’s set up, all you need to do is select the cells with the shifts you want to send reminders for, then press the SEND button in the top corner. Emails will then go out from the Google account that you’re viewing the spreadsheet from. Here’s what you need to do:</p><p><em>1. Set up your text</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wVTQkDbsPC62rQ55KW-a9Q.png" /><figcaption>The Copy sheet (the second in the Google Sheet) holds the templates for your mail-merge.</figcaption></figure><p>The second sheet in the sample document holds the template copy. Make sure to set your own subject, text and sender name. Adding a BCC address to track of your outgoing mail is optional.</p><p><em>2. Authorize your account</em></p><p>This is a scrappy tool for scrappy campaigns, so here’s a small hurdle. The first time you send from your account, you’ll need to authorize the Google Script to send from your account. Add yourself to the schedule and highlight the cells with your details, then click the SEND button. You’ll be asked to authorize your account. Once you have, you should receive your email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*ibmVMSs5Juvb3_qfONp7TQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DD20KW2Y8YvdphQ6PGx-CA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*loNiNkoK_9NpK6D6nlv2ZQ.png" /><figcaption>The three steps of authorization — click Continue when asked, select the account to use, then Allow the script to have access to your account.</figcaption></figure><p>If you want to check over the code before you use it, you can find it in <em>Tools &gt; Script Editor</em>.</p><p>That’s it, you’re set up! Now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgKiw7G_MQEqBPYcAfLYdA.png" /><figcaption>Select the rows and hit send! Your volunteers will be reminded that they should come in the next day.</figcaption></figure><ol><li>Start scheduling volunteers using the schedule.</li><li>Choose a time for yourself to send out the notifications every day</li><li>At that time, select the rows for your next day’s volunteers,</li><li>Hit Send,</li><li>Revel in the knowledge that you’re helping your volunteers to keep their promises to help!</li></ol><p><em>Tip</em>: you can add more data for your mail merge! The sending code takes the name of the merge from the column heading on row 2. For example, if you need to tell your volunteers who they should report to, just add a “Coordinator” column to each day in the weekly spreadsheet, and add <strong>$(“coordinator”)</strong> to the Email Text wherever you want it to show up.</p><h3><strong>Engagement Report</strong></h3><p>As your campaign grows, you’ll have volunteer opportunities that come with some more responsibilities or more difficulty. When that day comes, you’ll need to know which volunteers you can really rely on. That’s where the Engagement Report comes in.</p><ol><li>As your volunteers leave for the day, log their attendance (add an “x” in the <strong>✅</strong> column for their shift). Mark your cancellations/no-shows with an “x” in the <strong>❌ </strong>column (note: always use lowercase x’s for the log).</li><li>At the end of the day, copy all the shifts for the day in to the third sheet, named <em>Attendance</em>.</li><li>Then go to last sheet — <em>Engagement —to </em>see the details.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*vJ-e_15MxZrlt-REOclrdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGR74Ltchc0NVMjomIpC-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LuROxmCUYfx6n11-obb7Zg.png" /><figcaption>The three steps above, with the compelling imagery of spreadsheets.</figcaption></figure><p>The Engagement sheet lists every volunteer you’ve taken attendance for, along with their email address and the number of times they’ve been marked as present, or marked as a cancel/no-show. In column E, the volunteer gets a <strong>✅</strong> for “Engaged” if they’ve attended more than once (you can adjust the formula for your needs). Finally, since we use Nationbuilder, we included column F as a place for the volunteer coordinator to mark down whether the volunteer’s been added to the Nationbuilder list for engaged volunteer.</p><h3><strong>Improvements, and two requests</strong></h3><p>This is as much as we needed, but there are lots of opportunities for improvement! You could make the sender work with HTML mail, or send the shift data to an email API so you don’t need to rely on GMail. You could send attendance data directly to your CRM instead of compiling it in a spreadsheet. You could add a column to capture what the volunteer did on each shift and tally it up in the report. Or, you could improve the reporting formulae so that it sums up the number of hours worked, or the difficulty of the task, rather than just the number of times they showed up.</p><p>So here are two requests: First, If you use this and find it helpful, please let me know here (or <a href="https://twitter.com/senning">@ me on twitter</a>)! I’d love to know that it’s been useful to you. Second, if you make improvements for your campaign, send me a copy (or send a pull request for the Google Script here) and I’ll incorporate what I can in to my version.</p><p>Happy campaigning, and thanks for working for democracy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d0058898d77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning from Smashing Conference and making a demo]]></title>
            <link>https://medium.com/@senning/learning-from-smashing-conference-and-making-a-demo-96cc6ae3eed8?source=rss-6421c338f255------2</link>
            <guid isPermaLink="false">https://medium.com/p/96cc6ae3eed8</guid>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Senning Luk]]></dc:creator>
            <pubDate>Thu, 12 Jul 2018 19:11:57 GMT</pubDate>
            <atom:updated>2018-07-12T19:11:57.162Z</atom:updated>
            <content:encoded><![CDATA[<p>I got to attend the <a href="https://smashingconf.com/toronto-2018/">Smashing Conference</a> in Toronto last week, and it was such a privilege to watch so many brilliant people share and show their work. Smashing’s rule against slides - encouraging presenters to do their thing live instead - meant that coming out of the conference I had a lot of practical knowledge to apply. The collaborative Google Doc notes for the sessions were great too, encouraging people to focus on the stage rather than their laptops, and encouraging a sense of community.</p><p><a href="https://zurigroup.com/?utm_source=senning">Zuri Group</a> paid for my ticket to the conference and asked me to share what I saw with the team. I was partway through writing up a report when I realised that really wasn’t in the spirit of the conference - so instead I decided to combine and apply my favourite lessons from the conference in to my<br> bread-and-butter as a non-profit web developer — the donation form.</p><p>I’ll outline the big features below, and you can follow along with <a href="https://zuri.github.io/smashingconf-demo/index.html">the sample form</a> (you can find the source code <a href="https://github.com/Zuri/smashingconf-demo">here</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X4cfb9jGy2ZPCcmO79IgxQ.png" /><figcaption>A demo donation form for The Raccoon Fund — give generously to this great (sadly fictional) organization preparing for our future, multispecies-governed world.</figcaption></figure><h3>From the conference</h3><ol><li><strong>Prioritize accessibility</strong><br>The core of <a href="https://marcysutton.com/"><em>Marcy Sutton</em></a>’s <em>Accessibility Audit Live</em> talk was “designing inclusively helps everyone,” and I tried to keep that in mind for this build. The <a href="https://axe-core.org/">aXe browser plugin</a> that she and her team built is a real help! The colour-contrast notes and ARIA warnings were especially great.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*P8u04unsczBGi2ZqtZ2yPQ.png" /><figcaption>The aXe plugin. Easy accessibility testing is a beautiful thing, especially when your page passes</figcaption></figure><p><strong>Avoid input placeholders</strong><br> I’ve heard that placeholders were bad practice before, but it’s still an attractive design. Marcy hammered it home and convinced me it was time to get away from it. I took the new input design from Google’s <em>Material Theming</em> guidelines which is a good compromise — we start with a label set inside the field, which moves above the field when it’s focused or has content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*w5yikMpcz0y57FnIO1BFXw.png" /><figcaption>Sample input fields, showing fields which passed validation, and one currently focused. Helping donors focus on what you need them to focus on is a win-win</figcaption></figure><p><strong>Manage focus</strong><br> We do a pretty good job managing what’s on screen for many users, hiding things that they don’t need to see behind multiple steps or modals. But we always assume that our users will see what’s on screen and be able to click or tap on things (thanks to mobile users, we don’t generally use hover states for content anymore). I added a bit of JavaScript to set focus on the first input on load, and on the first useful input when the user advances a step or tries to advance with invalid fields. Every developer’s gotten complaints about the browser-standard dotted border for focused fields, so I replaced it with a blue halo for buttons and blue border for text inputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*OpsVZHC1T51c1LPHJRxxOg.png" /><figcaption>A button to turn off animations on the page. Turning off animations can also help if you’re hungover</figcaption></figure><p><strong>User control of animations</strong><br>My final takeaway from Marcy’s talk was her note that some users can get nauseous with motion animations on the screen. She suggested providing a button to disable them, as well as respecting the prefers-reduced-motion media query (currently just supported by Safari on OSX). In this example, we’re only showing animations on the text label and we handle all animations using CSS, so this is very easy to manage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*jXi7Q6Rus1j9mnGr9hJeEw.png" /><figcaption>Chrome Lighthouse test results for the page. Two seconds to interactive even on a 3G connection is pretty good!</figcaption></figure><p><strong>Inline styling/Progressive enhancement</strong><br><a href="https://timkadlec.com/">Tim Kadlec</a>’s <em>Performance Audit Live</em> and <a href="https://csswizardry.com/">Harry Robert</a>’s <em>Third Party Performance Auditing</em> providing great tips on using Chrome’s dev tools, <a href="https://www.webpagetest.org/">Webpagetest</a>, and <a href="https://requestmap.webperf.tools/">Request Map Generator</a> to find the big pain points for loading speed. I didn’t have time to run through these audits in detail, but I applied some key takeaways: inlining CSS required to get our page ready and interactive (page structure and visible fields), and deferring things we don’t need straight away (jQuery, other JS, and the remaining CSS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*_zzeN0rpZfGLmk5PoaOzOQ.png" /><figcaption>An application of mix-blend-mode. Never waste a chance to celebrate the upcoming raccoon emoji</figcaption></figure><p><strong>Mix-blend-mode</strong><br><a href="http://lea.verou.me/">Lea Verou</a>’s <em>Even More CSS Secrets</em> was a hilarious and fun celebration of all the great things we can do with pure CSS these days. Everything from using emojis as backgrounds through SVG to descendant grids for nicer layouts - there were a lot of great tips I’m itching to use. Unfortunately, donation forms are one of the watering holes for older browsers on the internet, so I couldn’t use most of them here.<br><br>I used mix-blend-mode here as a treat for browsers where it works (yay progressive enhancement!), but mostly so I could talk about how much I enjoyed this talk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*YE00DHU6j5bqbNo9ctO2GQ.png" /><figcaption>A well-labelled submit button including the donation amount</figcaption></figure><p><strong>Checkout psychology</strong><br> My key takeaway from <a href="https://mrjoe.uk/">Joe Leech</a>’s <em>Checkout UX Audit Live</em> was to follow design axioms and to build great experiences on top of that, and that’s what I tried to do. In this build, every button looks clearly like a button, the steps follow a standard checkout order, and we label the submit button with the actual donation amount. We also stick with a clear colour scheme — green for go (submit button, validation pass) and red for stop (invalid fields).</p><p><strong>Design quickly</strong><br> Finally, <a href="http://danielmall.com/">Dan Mall</a>’s <em>First Minutes of Design</em> was a fantastic look at his process of getting going quickly and still getting great results. His steal-imitate-remix-invent cycle helped me ramp this up quickly, and generated great ideas for future enhancements.</p><h3>Great things we’re already doing</h3><p>As always with Zuri Group, I built this form to be responsive — in this case, eschewing the standard, Bootstrap breakpoints in favour of fluid sizing (thanks to Dan for the reminder that it’s a legitimate way to build).</p><p>Following standards set by the vendors we work with, I also built this single form to support different types of donations (single, monthly, and by installments) and custom donation amounts. We also gracefully handle server-side errors — when the user lands on the form with values set, we set the state of the form following the values already set (i.e. we hide the credit card fields if the form starts with payment type on PayPal)</p><h3>Other fun things from the conference</h3><p>The Smashing Conference packed an extraordinary number of great sessions over just two days. <a href="http://www.gemmaobrien.com/">Gemma O’Brien</a>’s <em>Beyond Fonts: Elevating Lettering to Art</em> was an inspiration, and made me want so badly to get back in to calligraphy. <a href="http://www.visualcinnamon.com/">Nadieh Bremer</a>’s <em>Creating an Effective &amp; Beautiful Data Visualization From Scratch</em> was a fantastic illustration of designing based on data and goals (rather than type of chart), and for D3. And <a href="http://seb.ly/">Seb Lee-Delisle</a>’s laser-projections and applause-powered Flappy Bird were real crowd pleasers.</p><p>I had a fun and enlightening time at the Smashing Conference. I can’t wait to boost my client work with what I’ve learned and seeing the real conversion benefits they can provide. And I can’t wait to go to another Smashing event next time they’re in Canada!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96cc6ae3eed8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Push Notifications with Ionic and Cordova-Plugin-Firebase]]></title>
            <link>https://medium.com/@senning/push-notifications-with-ionic-and-cordova-plugin-firebase-ab0c0cad3cc0?source=rss-6421c338f255------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab0c0cad3cc0</guid>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[Senning Luk]]></dc:creator>
            <pubDate>Thu, 17 May 2018 11:28:53 GMT</pubDate>
            <atom:updated>2018-05-17T11:28:53.679Z</atom:updated>
            <content:encoded><![CDATA[<p>This was a real journey full of pitfalls, so here’s the step-by-step for adding Cordova-Plugin-Firebase to your Ionic app.</p><h3><strong>Install plugin</strong></h3><p>Make sure you’ve set up <a href="https://www.npmjs.com/get-npm">NPM</a> or <a href="https://yarnpkg.com/en/docs/install">Yarn</a>, and <a href="https://ionicframework.com/docs/intro/installation/">Ionic</a>. Then install the plugin:</p><pre>ionic cordova plugin add cordova-plugin-firebase</pre><pre>npm install --save @ionic-native/firebase<br><em>or</em> <br>yarn add @ionic-native/firebase</pre><h3><strong>Add to app code</strong></h3><p>Next, add add the following code to your app.component.ts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0860fe507af544375d5e096cdee1f98/href">https://medium.com/media/c0860fe507af544375d5e096cdee1f98/href</a></iframe><p>Plus, make sure to include these libraries in app.module.ts too.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0979b507bbfddd2700bb8a8e3b7aff18/href">https://medium.com/media/0979b507bbfddd2700bb8a8e3b7aff18/href</a></iframe><h3>Get icons</h3><p>Create a 96x96px PNG that’s just white and transparent. Upload the image to the awesome <a href="https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=clipart&amp;source.clipart=ac_unit&amp;source.space.trim=1&amp;source.space.pad=0&amp;name=ic_stat_ac_unit">Android Asset Studio — Notification icon generator</a>. For the next step, we’re going to use “notification_icon” as the image name, but feel free to use whatever you like in your app. Download the package, create the directory {project root}/resources/android/notification and extract the icons there.</p><h3>Add to config.xml</h3><p>Finally, we’re going to get Ionic to copy our icon files to the Android bundle, and we’re going to make sure Firebase notifications actually use them:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e81e91ae15ec58f4fa2ae765b785685d/href">https://medium.com/media/e81e91ae15ec58f4fa2ae765b785685d/href</a></iframe><h3>Set up Firebase</h3><p>Go to the <a href="https://console.firebase.google.com/">Firebase console</a> and create, or go to, your app. In the Cloud Messaging section, follow the instructions for adding Android and iOS apps. Make sure to set up the interface to the <a href="https://firebase.google.com/docs/cloud-messaging/ios/certs">Apple Push Notification Service</a> too.</p><p>—</p><p>And that’s it for setup! Build your Ionic app and deploy it to a device or simulator and open it up to grant permission to receive notifications. Send yourself some test notifications through the Cloud Messaging console (just set the Message Text, and Title in the Advanced options) and you should see notifications pop up with your spiffy new icon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab0c0cad3cc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>