Python Coding for Marketers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Good morning. Thanks so much for joining us this  morning for Python Coding for Marketers. My name   is Jim Brophy, I am the group director of digital  here at Northwoods and I will be your moderator   for this morning. You might be asking yourself -  what exactly is Python, and how can I use it to   help me in my marketing activities? Well, you've  come to the right place. We're going to spend   the next 40 minutes or so laying it out for you in  brief. Python is a newer programming language that   many marketers have found beneficial in helping to  improve efficiency and measurement. As marketers,   we no longer need to rely on developers to  build tools to provide insights into our   marketing tasks, and that's great news. Besides,  not all of us have access to developer staff.   So today we're going to dive into Python basics,  the benefits of learning Python for marketing,   show some examples of Python in action and how to  get started with Python. If any questions come up   at any time during the presentation, please go  ahead and submit them using the chat feature   and we'll answer as many as we can during the Q&A.  Also, we'll be sending out a link to a recording   of today's program in the next day or two so you  can re-watch it or share it with your colleagues.   For those of you who are not familiar with  Northwoods, or if this is your first time   attending one of our webinars, I wanted to  take just a minute to introduce ourselves.   We're a digital strategy, digital  marketing and advertising,   website design, and software development agency  located just north of Milwaukee, Wisconsin.   We've been helping companies grow their online  presence for more than 23 years, and have worked   with more than 900 clients of all sizes across  a wide variety of both B2B and B2C industries.   At Northwoods we keep up on trends and best  practices constantly and develop some of our own.   And in doing so, we develop strategies based on  data and thought leadership that you can count on.   You can check out our blog and  client stories at nwsdigital.com.   One of our core values here at Northwoods is  lifelong learning, and we're proud to share our   knowledge with others by offering dozens of free  education programs every year including webinars   like today's. You can find a schedule of our  upcoming classes at learnatNorthwoods.com.   But enough about us - let's go ahead  and dive into our presentation.   Your trail guides this morning are certified  experts in the digital marketing space.   Up first is Amanda Hoadley. Amanda is  a digital marketing strategist here at   Northwoods, with specialties in SEO,  technical SEO, and Google Analytics.   Amanda previously worked at Kohl's department  stores where she worked on technical SEO.   Presenting with Amanda today is Katelyn Staaben.  Katelyn is a senior digital marketing strategist   here at Northwoods, with specialties in digital  business analysis and website strategy persona   development, and search engine and content  optimization. She holds certifications in   Google Analytics, Google Ads, and conversion  writing. So you're in great hands this morning.   So I’m going to get out of the way and turn  things now over to Amanda. Take it away Amanda.   Thank you Jim for the wonderful introduction and  today's journey will consist of Python basics,   benefit of learning Python for marketing, Python  in action, and getting started with Python.   So to begin we will go over some Python  basics. So what exactly is Python? A simple   definition is Python is a high-level programming  language that is designed to be highly readable   and easy to implement. The Python interpreter is  free to download from Python.org, and there are   versions for Linux, OSX, and Windows. And fun  fact - the name Python actually comes from the   surreal British comedy group Monty Python, not  from the snake. So knowing Python as a marketer,   you'll be able to find opportunities. You'll be  able to prioritize experiments, be able to devise   a new strategy, build campaigns, and evaluate  your results to make data-driven decisions.   And automate your campaigns. Python is the  world's fastest growing programming language,   not just among software engineers, but also with  network engineers mathematicians, data analysts,   scientists, accountants, and yes, us digital  marketers. So what makes Python special?   Well it is able to solve complex problems  in less time with fewer lines of code.   See the example here with C#, JavaScript,  and Python. When extracting the first three   letters of Northwoods, this would be the line of  code for each. And you can see that Python uses   fewer lines of code compared to the other two.  Additionally, Python is a cross-platform coding   language which makes it easy for anyone, and  can run Python applications on Windows and Mac.   There are many integrated development environments  such as PyCharm, Google Collab, Pythia, Visual   Studio Code, and Visual Studio. Python improves  marketing campaigns by addressing mistakes that   are inadvertently made by marketers, which include  inefficient keyword management, results tracking   errors, inaccurate ROI calculations, and even  content marketing optimization. And what's great   is that programmers don't need to know math. There  is a common anxiety that programmers should know   a lot of math, however that is not true. Most  programming doesn't require math beyond basic   arithmetic and being good at programming isn't  much different from being good at sudoku puzzles.   Much like sudoku, writing program involves  breaking down a problem into individual steps.   The Book Automate the Boring Stuff with Python  explains a great comparison of Python to sudoku.   Just because sudoku involves numbers doesn't  mean you have to be good at math to figure out   the solution. The same is true for programming.  Like solving a sudoku puzzle, writing programs   involves breaking down a problem into individual  detailed steps. Similarly when debugging programs,   which is finding and fixing errors, you'll  patiently observe what the program is doing and   find the cause of the bug. And like all skills,  the more you program, the better you'll become.   Additionally, Python has what is called  libraries. Python libraries are a set of   useful functions that eliminate the  need for writing codes from scratch.   Python libraries play a vital role in data  science, developing machine learning and data   visualization, and image and data manipulation  applications. The most useful libraries for data   analysis and automation is pandas. And pandas  is a powerful, fast, flexible, and easy to use   open source data analysis and manipulation tool  built on top of the Python programming language.   So now that you know some basics, let's dive into  the benefits of learning Python as a marketer.   So, as a marketer, you probably run across these  problems such as - ads are getting too expensive,   you need omni-channel presence but  it's hard to manage and coordinate,   you have tons of data coming from your online  advertising campaigns but you don't know how to   get valuable insights from them without investing  funds in expensive automation tools, and sometimes   it's hard to calculate your returns on investment  due to attribution problems, and other challenges.   So the question is, can you solve at least  some of these problems with Python automation?   And the answer is yes. Because of its simplicity  and understandability, it can benefit those even   with minor coding experience. And what's  great is coding is not just for developers.   These days programming is an important  factor in designing and executing digital   marketing strategies. Critical digital marketing  activities such as web ads, videos promotions,   and social media would not be possible without  software programs. Which is why it is essential   for marketers to understand programming basics in  addition to knowing some html, marketing teams can   benefit by becoming familiar with and leveraging  the power of Python to help improve efficiency.   And Python is a tool that can drive automation  across all of your marketing activities.   So do you get tons of data from multiple sources  for which you need to produce periodic reports?   Well Python is an efficient  tool for data pre-processing,   analytics, and data visualization. You'll need to  write code only once to create a report, and after   that reporting can be done within minutes. As well  as content optimization, AB testing is a popular   marketing tool for comparing several versions of  a website app or an ad to determine which performs   best. So for example, if you have two groups  of customers - one that is exposed to group ad   a and the other is exposed to group ad b.  You can then compare these two ad groups’   conversion rates to find the winner. Of course,  the difference should be statistically significant   for you to conclude that one of the ads is  indeed better. And Python is a perfect tool for   streamlining AB testing and defining statistical  significance of the resulting difference.   As well as customer segmentation, delivering  personalized experience to customers is a must   for marketers these days. But before you can  personalize your messaging and experience,   you need to understand your customers behaviors,  preferences, and habits. Python gives you access   to the most sophisticated clustering  techniques. A number of machine learning   techniques that are easily implemented with  Python will help you classify your customers   by features that really matter, increasing your  revenue, and improving your customers experience.   As well as customer feedback analysis - customers  use multiple channels to leave feedbacks about   the products that they use. And large companies  in particular struggle to manually analyze all   the reviews left on different websites and social  media platforms, and this is a perfect opportunity   for automation. And coding has been portrayed as  a solution to all problems, but let's be real.   Python will not help you accomplish tasks such  as writing copy for a new ad campaign, unless   if you are very well versed in how to conduct  artificial intelligence. It will not automatically   create brand new pixel-perfect email templates for  announcing a new product or sale promotion, and it   surely will not attend meetings for you. Otherwise  Python is here to help you if you are drowning in   spreadsheets. And learning Python can be cheap  instead of using expensive tools, or allowing   you to translate knowledge into other areas  such as speaking to developers at your company.   And using Python as a marketer has many advantages  that help with repetitive data gathering and   management tasks. Understanding how to use  Python can help turn those repetitive tasks into   automated ones. In many of the examples I have  explained already, which include ROI calculations,   customer segmentation, managing campaigns,  and gathering data, these tasks can be easily   automated using Python, creating more time for  marketers to focus on other critical initiatives.   So to dig a little deeper, we'll  speak more on campaign management.   In the marketing world campaigns consist of  a variety of channels and tactics, including   SEO optimization, Google ads, email, video, and  social media. Using Python, marketers can develop   custom marketing campaigns to integrate and manage  each of those components. And when campaigns   launch, marketers monitor, review, and analyze.  And here is an example from Towards Data Science   of Python pulling information into a spreadsheet.  Here you can see impressions, budgets, region,   and whether the ads are showing on  Facebook, Instagram, Google search,   or Google display. Therefore, marketers who know  Python can develop programs that will monitor,   review, and analyze various campaign  elements to help them make the right changes. And marketers gather data from multiple sources.  Analyzing and processing data from each source can   become quite repetitive, but creating custom tools  to generate data from each makes data collection   a breeze. So, enter Python. Examples of data a  marketer can collect using Python include: changes   in url ranking, collection of email responses,  changes in competitor product or services,   gathering survey data. So here's an example of  Python pulling information into a spreadsheet   to view landing page performance. And here's the  code that you would type in to pull data from the   table. And for a better visual, here's the code  typed out. In green is what you would change,   such as the file name, the name of the sheet  you are wanting to pull data from, in the rows   and columns you want to gather. And since we are  wanting to pull data for landing pages, sessions,   percent of new sessions, and  new users, here is the result.   The original table included bounce rate, gold  conversion rate, and other gold metrics we want   to ignore. So here is Python reading the code and  only providing the information we want to analyze.   In digital marketing, data is useless  if it's not meaningful or accurate.   But using Python can help marketers gather  data and analyze it efficiently and accurately.   And Python is easy to learn. It is understandable  and simple. It's easy to learn because of its   clear syntax and legibility. It's also great  for those with little to no coding experience.   For instance, look at the difference with  the following code to print “hello world”   in Java in Python. But don't think because  Python is easy that it's a wimpy language.   Python is actually incredibly powerful. There's  a reasons why companies like Google, Drobox,   Spotify, and Netflix use it. Python provides many  automation opportunities for low-level tasks which   we usually spend several hours undertaking. Python  gives us the ability to better understand data   and make data-driven decisions. And these  decisions will enable us to provide better   insights for our clients and more confidence  in the recommendations that we implement.   So the answer to the question - how  long does it take to learn Python?   It really depends on what your goals are.  And you can learn the basics in as little   as a week or two. And having a solid grasp of the  basics, such as the variables, the functions, and   the if-else statements can be enough to help you  solve problems at work or write simple scripts.   And if you're a marketer who would like to  analyze Google Analytics data more rigorously,   you can learn the fundamental syntax  of Python and the pandas techniques,   you need a matter of weeks. But if you're  learning Python from scratch, you need at   least a few months. But to be clear - you could  probably spend a lifetime learning Python,   because coding is always changing. And just like  any other skill, you’ve got to keep doing it.   And now that you understand the Python basics,  I will hand it over to Katelyn, who will cover   more in-depth examples of Python in action  and how to get started with Python. All right,   thank you very much Amanda. So as she just said,  we're going to jump right in to a bunch of really   cool things you can do with Python. We're actually  going to show some really cool examples as well.   But, before we get there, let's talk a little bit  about why you would choose Python over a pre-built   tool. So you've given a bunch of different cool  things that Python can do. How do you know when   it's the right time to build a tool in Python,  versus just using something that exists already?   So here's a great example. A good way to think  about it is - does this tool that you want to do   things, whether it does this thing that you want  to do, already exist? For example, I can build an   awesome tool in Python that takes data, pulls data  from Google Analytics, pulls data from Google ads,   pulls data from a spreadsheet that I’m adding, and  pushes it all out into one easy place to read and   see all this data in one place. Or I could use  Google Data Studio that already exists and does   that pretty well on its own. And it's free. So,  kind of looking at the gaps in the current tool   set that you have, and what are some things that  you maybe want to do that you can't do right now,   or can't do easily right now. That's where Python  can really jump in and be a really powerful tool.   Another thing is - what would that pre-built tool  cost? Maybe you don't have a tool to do something   right now, and all of the tools out there that  do it are really expensive. Now, sometimes   they're expensive for a reason. Sometimes they  need to be expensive because they need to be   incredibly powerful, and they need to do all  this analysis that you just can't do in Python.   But sometimes, maybe you just need a portion  of that tool to do what you want to do. Maybe   you just need a little piece that can do just  a little bit of data analysis to get you a good   chunk of the way there on your own. If Python  is able to accomplish that, which often it is   if it's data analysis, it might be a great tool to  jump into and build yourself. Save a little money.   The other thing, just to make sure, is to double  check if Python is capable of doing what you   need it to do. So like Amanda said, Python's not  going to be, unless you're really good at AI and   figuring out, you know, this kind of natural  language processing, Python usually isn't   going to be writing ad copy or building  out email templates or things like that.   But it can build really great powerful tools.  So, keep in mind, you know, if you need a tool,   or if you need an entire factory to do all this  building for you. If you need the whole factory,   if you need all these different things, it might  be good to see if there's a tool already built   to be able to accomplish it. But in many cases,  Python is an awesome tool to build and to create   to meet those needs. As Amanda was explaining,  there's a lot of reasons why you might want to   use Python. And often those pre-made tools may  not even be available to do what you want to do.   You can build something that's custom to  exactly what you need. You don't have to pay for   this huge suite of tools when you just need  one little bit of data analysis that would   dramatically improve the way that you're doing  your marketing and your analysis. And again it's   custom - you can build something that specifically  meets exactly what you need it to do, which can   be really great and really powerful. Because how  often can we say we have a custom built marketing   tool that we've made ourselves? It's pretty cool.  So, let's give some examples of that. So, we   have a couple tools here at Northwoods that we've  developed using Python in our marketing team that   we can use to help do various different tasks and  help us to do a lot of different cool things that   we couldn't do before. The first one that we're  going to look at, and we're going to see these in   action in just a couple of minutes, is a web page  word counter. So this is a tool that will go out,   it will give it some web pages, it'll scrape those  web pages, take down all the words on those pages,   and then count them up so we can do some analysis  with that. We'll show that in a little bit. So in   this case, this is a tool that adds to our suite  of analysis tools. This is something that we don't   have any tools in our marketing arsenal right now  that can do that. So this is kind of filling a gap   and helping us to be even more strategic  in the recommendations that we're making.   The other tool is more of a utility. So one  thing that Python's really great at is combining   different systems together that maybe don't  naturally work together on their own. So in this   case, like a lot of people I think, we build lots  of PowerPoints here at Northwoods, especially our   digital team. And there's a few different things  we do with PowerPoints that are very repetitive.   We're always entering certain data from Google  Analytics for example into PowerPoint. So this   tool takes a few of those things that we're always  entering from Google Analytics into PowerPoint   and does it automatically, so that we don't have  to go and manually take that data from Google   Analytics. We can enter some data into Python and  it will do all of the heavy lifting for us. So one   tool that adds some additional kind of strategy  analysis, and one tool that makes things just   a little bit more convenient. We're going to see  them both. Let's start with the web scraping tool.   So the goal of this tool was to build something  that provides word counts for web pages. So what   I mean by that is, we wanted something that we  could give a single web page, an entire site   full of web pages, and it would tell us how many  times we said a certain word. Would basically go   through, count up all the words, and say - this  site, the most commonly used word on this site was   “blank.” So we can get an idea of what words that  the website is using to describe their services,   what features are the most important to them,  what are they talking about the most. And   we can use that for some of our  own analysis. Python is great   at this because of a couple things. One is that I  think as we've kind of said a bunch already it is   built for data analysis. There is so much  you can do with data analysis in Python,   it's really meant to kind of take all that data  and do all of that kind of heavy lifting for us.   The other is that there's a great Python library  for it. Manufactured on the pandas library,   a little bit earlier, but another library that can  be really helpful is one called beautiful soup,   which I think is just a very fun name. And it's  basically meant to do this kind of work. It's   meant to do web scraping and you can kind of take  that web scrape and do some analysis with it.   All these Python libraries are as easy as kind of  installing them onto your kind of Python system,   I won't get into the details of how that works,  and then just inserting them into the code,   and then they just kind of work. They're really  nice - kind of like plug-ins on wordpress,   where that functionality is already built  for you, and you can just kind of do your   own analysis using that functionality. It  gets you very close to getting started,   and it's really great. So. One thing to keep in  mind with this is that a lot of these tools kind   of work in conjunction with other things we might  already have. So for example, with this tool,   you'll see in a second that we need to give it  the web pages to scrape. Obviously it can't kind   of read our minds - what web pages we want. And we  can do it with just a single web page. That's what   we're going to do today, just to make it easy.  But a lot of times we want to scrape an entire   website. We want to say - here are all of the  pages on this website. Let's see, let's compare   all of them together. Let's see what this company  is saying on their website as a whole rather than   just on a single page or in a section of the site.  And we will compare that to a different website,   and you know we could go and manually get all of  the URLs from a website, but that doesn't really   seem like a great use of our time. So in this  case we're using a tool called Screaming Frog.   Another great web scraping tool that doesn't quite  do this functionality, gives us some other really   great SEO data instead, but we use that tool to  get all the web pages. So just keep in mind that,   you know, you don't have to build everything in  Python, you can kind of use some of the data you   have from an existing tool, and then just use that  data to kind of build your own tool from there.   So how this tool is going to work, and I’m going  to show it in a second, but just to kind of get an   idea of what's going on, is that we're going  to give it a series of web pages. One page,   multiple pages, whatever we'd like. We're going to  basically save all those in an excel file ahead of   time and we're just going to say – go, on the  Python file. And what's going to pop up is it's   going to give a little message that says - okay  I’m going and I’m saving this website copy now.   And as it's doing that, it's going to those web  pages we've given it in excel, and it is scraping   all of the html from those pages, so not just the  copy, but all of the other kind of code that makes   that page work. From there it's going to keep  going, and it's going to start cleaning up that.   So it's going to take out all the html, it's going  to take all the punctuation, it's going to get   us so that we just have the words and that is it.  From there it's going to take those words and it's   going to list them all out. So words are going  to be repeated, but we're going to have a list   of just the words on the page. We're not going to  see any of this happening, so it's all happening   behind the scenes in Python, but just so you now  kind of know like what it's doing as it's going.   Once it has that list of words, it's going to  start cleaning up that list of words. So it's   going to take out some of those filler words  - the so's, the these, is, it, that. We don't   really care how many times they say the words  “the” on their website. We care how many times   does they say the word “feature” or “schedule” or  “demo” or stuff like that. From there it's going   to take that big list and it's going to start  counting. It's going to say - oh I see the word,   in this case we're using our content management  system, Titan CMS, we’re using the home page for   that site. So it's going to say – oh, there's the  word Titan. There's the word Titan again. We've   got two now, so on and so forth, until it has  a count of all of the words that are the same.   And then Python's - we're going to finally see  something again in Python - it's going to say   your csv is complete, go open your file, and we'll  go and have our answer. So let's see in action. So   one second, I’m going to actually bring up Python  here. This is the one we want. All right, so this   is just a folder of Python files, doesn't mean  too much but we're going to see something first.   So first thing we want to look at is this  spreadsheet here. So this is where we're putting   in all of those URLs. So in this case you can see  we've got one Titan cms.com, but we could have as   many as we want. I’ve done this with 500 URLs I  think is the most I’ve tried, and it worked, it   just took longer, so we're keeping it simple for  today just to speed things up a little bit. The   other thing we're looking at is nothing! This is  that final word count file. This is where Python   is going to take all of the words that it's doing  and it's going to give us an output here. So this   is more so just showing the magic trick of it. Now  you don't see it, but in a little bit you will. So   just keep in mind - final word count, empty for  now, but it's going to not be empty in a minute.   So from there we've got those nice and closed to  make sure this works and we're going to open up   Python. So you've got Python here. And, you know,  all sorts of code in here, but we're just going to   let it run. So let's run this module. Let's  see here it is going? There we go, all right.   So we see Python is starting to go after it starts  gets warmed up a little bit. Here it's going to   say saving. Sometimes it likes to run kind of  slow when we're kind of live streaming this, so   bear with it. Normally it runs pretty quick. There  we go save a website copy. Look - simple as that.   So as you can see, all of this is stuff that we  just included ourselves, it's mainly just to know   if something breaks. I like to recommend kind of  putting in little messages that pop up so that if   something doesn't pop up you know where something  went wrong. But in this case we're good! We got   “saving website copy,” it counted up the words, it  cleaned up the same list of words, and now our csv   is ready. So let's close it down, let's go back to  our folder, and that final word count suddenly was   updated a minute ago so that's a good sign.  So let's open up that final word count and   hopefully our magic trick works.  There we go! So this was empty before,   now there's some words in here. So we can see  the words “enterprise” “content “management.”   Makes sense - it's an enterprise level content  management system. Makes sense we say those words.   And our tool’s, you know, obviously kind  of always learning, always cleaning it up.   Right now we've got a couple of weird code  things that pop in there, but in general it   works really well. We can see all this stuff here  and we suddenly have a really good idea of what   words that website is using. So kind of  hopping back to our presentation here,   how we kind of use that going forward then  is we can build charts. We can say all right,   on the Titan CMS website let's organize all of  that data Python just gave us and we can see that   the words we say the most often on the Titan CMS  website - this is the website as a whole now,   but - are Titan and CMS. Pretty straightforward.  But we can also see that we're saying the words   “content.” We're saying “data” because data is a  really powerful feature. We can see “scheduling   a demo” we can see “features” “support” and  we can compare that to another competitor’s   website and say – well, what words are they using  that we're not using? And what can we learn about   their website their services, from that  information? Ao a cool way to see, you know,   a different form of data gathering. And data, you  know, data that we wouldn't be able to get without   a tool like this that kind of fills that gap  in our arsenal of tools. So just a cool example   there of something in action. Let's see another  one. This one like I said is more of the utility.   This is - we build a lot of PowerPoints, we  combine data from Google Analytics into that   PowerPoint, how can we make that easier so that  we can focus our time on doing fun stuff like data   analysis instead of filling out PowerPoints? So in  here our goal is to update a PowerPoint template   with data from Google Analytics. So why Python  is great at this is that it's awesome at linking   systems together. Especially big systems like  this where they've got pre-built API integrations,   they've got Python libraries that work well with  it. A lot of those things are already built,   by either actually Google or Microsoft, or by  other people who have done this before us. So we   can use those integrations to our advantage to get  us a good chunk of the way there. The one thing to   keep in mind with something where you're kind of  linking these other kind of programs is that there   is some assembly required, more so than if you're  building just your own tool. You kind of need to   set up some of the things with certain Python  libraries, for example there's a pptx Python   library, which its description is that it's meant  to create for creating and updating PowerPoint   files. Pretty much what we need it to do, which is  perfect. So we need to kind of get that set up and   we need to make sure that PowerPoint is installed  on the machine that you're using because it can't   kind of pull it out of nowhere. Google Analytics  also has their Hello Analytics reporting API,   which helps us to grab all that data from Google  Analytics. That does take some setup though. You   have to enable the API install and set up a Python  library that's associated with it and add the API   user to the account you're grabbing data from.  I’m not going to go into any of that today, we're   just going to jump to the fun stuff but just know  that there are tons of documentation on Google's   various support resources to get that going for  you if this is something you're interested in.   And you also make sure you need to know  that you have the view ID for the Google   Analytics view that you are pulling data from.  So if you're not familiar with where that is,   if you're in your Google Analytics account  there's a little tiny ID here underneath the view   that you can pull that from. It's also in  your view settings as the view ID there,   so that's going to be really important. Pretty  much anytime you're pulling data from Google   Analytics with Python, you are going to want  to have that view ID handy to make it happen.   So how this one works is a little bit different.  What's actually going to start off here,   and you'll see this in a second, is that it's  going to start asking us a bunch of questions.   Actually built into this one is sort of a little  input feature where it can ask us for data,   we can give it view IDs and date ranges and stuff,  so that we don’t have to do anything in the code.   We have to answer a question in the program and  it's going to put that where it needs to go into   the code for us. So it makes it a little bit more  convenient, and makes it a lot easier if you have   other members on your team here developing this  to use maybe aren't as comfortable playing around   in the code in Python. All they have to do is  answer questions so they don't have to worry about   messing with code if it makes them uncomfortable.  From there it's gonna again pop up a little   message saying – thanks, your presentation's  being created, we're doing what we need to do.   And it's going to form that connection with  the Google Analytics API. It's going to start   downloading the data that we are telling it to do  in Python. Just as a little fail-safe it's going   to print all of that data into Python, so you're  gonna see all of a sudden it starts scrolling   and it's gonna have a bunch of data in there and  we'll be able to see it kind of happening in real   time this time. So, less waiting more action I  guess if you wanna call it that. It's then gonna,   after it's kind of gathered all the data, it's  to ask another question. What do you want to call   your PowerPoint? Because now that it's got all  that data from Google Analytics it needs to have a   place to put it. In this case it's going to create  a brand new file. It's not going to be putting   the information into an established excel file,  it's going to create a brand new PowerPoint,   name it whatever we want it to make with  all of that great data we're pulling in it.   So after we give it a name, it's going to open up  PowerPoint, it's going to start putting in all of   that data into the fields that we're telling  it to, it's going to save the PowerPoint file   as the name we told it, and it's going to say -  your presentation is ready, you know, go check   it out. So let's see this one here as I get it up  so again, we've got a nice kind of file of a bunch   of folders. In this case we have a template set  up so we've got some empty slides here that have   some red areas that we'll have to go and add in  our own analysis or add in some information later.   But as you can see right now it's just basically  an empty file with a bunch of empty kind of graphs   and empty charts that we can put the data into  with our tool. So I’m going to close this one   out but as you can see there's no other bunch of,  you know, excel spreadsheets stuff. But there are   no other presentations in this folder, so what's  gonna happen is Python's gonna create a brand   new presentation and save it in there with the  name we told it to. So let's hop into the tool.   Here we go, let's run it. And just like the last  one it's gonna take a little bit to get started   and then it'll start asking us our questions in  blue. There we go, all right. So, hello what is   the Google Analytics view ID you would like to  access? So I have the one I want on the outside of   my screen. That is what we want, all right. What  is the start date of the most recent date range?   So in this case we have it set up to do kind  of a couple different date ranges, and do some   analysis and stuff with those date ranges. So I’m  just going to type in a couple that are relatively   easy to type so I don't mistype here. So we're  gonna go, we're gonna say our previous date in   this range is gonna be the first January 1st of  2020 and we're going to look at it compared to   January 1st of 2021. Right, so we're just  gonna do the exact same thing but a year   previously. So let's do 2019 to 2020. All right,  so now is where the fun happens. I'll click go.   Thanks your presentation is being created.  Look at all that fun data that's being put   in there - it's going crazy. And then you can see  here at the bottom, here it says - what would you   like to name the final presentation? We’ll be  really original and say “final presentation”   just for fun. Grea,t your presentation is saving.  And there we go. Your presentation is ready.   So let's hop back into that folder and suddenly  there's this final presentation PowerPoint.   So we'll pop in here, we'll see how red stuff is  there, but suddenly we have data! The other cool   thing is Python can do some of the calculation  for you. So we did not pull a percent change from   Google Analytics, we pulled these various numbers,  but we had Python do some of this. Calculating   a percent change and things like that for us. So  another cool thing you can do is some of that data   crunching and number analysis stuff in Python so  you're not kind of forced to do it off there. But   you always have a little bit of cleanup, you know,  some kind of weird stuff gets pulled sometimes,   you know, just depending on the way  you have different things set up.   But we can see everything is all filled out  and we're good to go. We've got a great start   to kind of keep us going. So a couple different  fun tools. So hopefully that gave you an idea of,   you know, how we use Python in our practice. But  also maybe to kind of spur some ideas of things   that you could use Python for. What are some  repetitive things that maybe you're constantly   copying from one thing to another that you would  like to clean up? Maybe there's something that   you've always wanted to know about a website,  or something you've always wanted to know about   different ways people are interacting with you  that you could learn with Python. Just kind of   think of those cool ways that maybe you don't have  data right now or something that would be really   nice to automate and see if there's a way to do it  with Python. Because there probably is at least a   way to get you a good chunk of the way there.  So kind of knowing all of this, how do you get   started? How do you jump into this? Because I know  as a marketer with not a ton of coding background,   up until a couple of years or two ago with Python,  that it can seem really overwhelming to jump in   and, you know, deal with all this code. You  know, it could be kind of scary as a marketer,   if you don't have a background in that to jump  in. But just know that there's a ton of good   places to start. Amanda is listening off some  great things to kind of learn about Python to   get you started. There's just a few of the various  things that could be helpful to know to get you   going. But just know that kind of getting an idea  of the basics, learning about what variables are,   learning those if-then statements, the flow  control stuff, getting kind of a - just taking   a month and learning the basics can set you  up to build some really really cool tools.   A really great thing to do is follow a guide.  Both Amanda and I love Automate the Boring Stuff,   which is a really cool Python handbook to help you  get going. Really great tool. There's also a ton   of resources on LinkedIn learning. That's formerly  lynda.com if anyone's used that. But tons of great   resources about Python there to get you going. And  just because Python is so heavily used in so many   different industries, there's just a ton of online  how-to’s, both in the basics as well as in some of   these really specific things that you're trying  to do. So use your resources online as well.   A big thing to keep in mind though is you don't  need to learn everything to get started. All you   need to do is have an understanding of the basics  and then pick a project. Pick something that you   want to learn how to do with Python and figure  out what you need to do to make that happen.   Really having a step-by-step process to follow  and a step-by-step thing you're trying to do is   a great way to learn, you know, those little  individual pieces even better. So map out the   process of what you want to happen, kind of  like how I showed with my little diagram,   and then just take it one step at a time,  testing as you're going along the way.   So for example, with our process here  this first one I had to figure out how,   if you put a bunch of URLs into a spreadsheet,  how do we get Python to crawl those pages and take   all the uh the content down. It's all I needed  to do to get started. So let's figure out how   to do that one piece. And then we'll figure out  the next step, and the next step from there. But   taking it one step at a time helps you to really  understand how to do this first piece, and once   you have that skill you can apply it to all sorts  of different tools you're making in the future.   Also don't forget to use your resources. Just  a simple web search for “Python web scraping”   has tons of different how-to's of the way  different people have done that for their various   projects. So use the resources out there as you're  getting started, it could be incredibly helpful.   Just know that with any new thing you're learning  uh you're gonna make some mistakes. Just learn   from learn those. Learn, uh, help you have a  better understanding of the process going forward.   So I hope with our presentation today you are  left with the feeling that marketers can code too.   And in reality we shouldn't even be saying that.  Marketers should code too! Coding and Python and   html, all these different coding languages are  such a huge part of our jobs now, with so much   of our focus being on digital marketing. So having  a skill like Python in your arsenal is just going   to make you get even more data and make it even  easier for you to do your job going forward.   Python is an awesome tool to get started with.  It's really easy to learn. It's really easy   to get going. It's an incredibly versatile  tool as we showed. There's a couple, there's   just the very versatile ways even we use it to  get us additional data, but also to simplify   our processes. It's a great tool for that. And  in addition for marketers, there's just tons of   applications we can use it in, from a marketing  perspective. Really think of Python as a gateway.   Because it's such an easy tool to learn a very  easy coding language to learn it can help open   the door to learning additional coding languages  in the future. Having a better understanding of   html and CSS, that are making your web pages look  the way they do. Or the JavaScript that's behind   kind of some of the functions and things happening  on your site as well. Having understanding of   Python will just make it even easier to understand  these things which are also incredibly important   to us as marketers. In addition, it's really a  bridge to your IT team. It helps you to kind of   speak the same language as your IT team and have  an understanding of at least a little bit of what   they do on their side. And what we've seen is  that really having a strong connection between   marketing and IT is just a great way to make sure  that everyone's goals are being achieved and that,   you know, you can kind of work with them  easily to do the things that you need to do   for your marketing. The big thing here is that you  just don't need to be an expert. All you need to   do is build one tool. Find that tool, the great  starting point that will help you to learn and   to build something that will be really helpful for  you. Then all you have to do is build another and   another and another as they come up and pretty  soon, not only do you have a great toolbox full   of awesome things that can help you to do your job  better, or do things more easily things like that,   you've also got a great skill set that can help  you in the long run as a marketer as well. So with   that I’m going to open it up to any questions. All  right, thank you Katelyn and Amanda. Let me get   into focus here. Hello um yeah we got a couple of  questions. You kind of touched on one of them here   towards the end, but let me kind of paraphrase  this question. If you were starting from scratch,   in other words you're getting into Python for  the very first time, as you're talking about   what's the first training resource you would use  to understand what is possible so they want to   dive in? You talked about, you know, googling a  couple of Python phrases and it's going to come   up with a lot of results, but if you were starting  again from scratch, what would you go to first?   Yeah, I know for me, Amanda I’m not sure if we  use exactly the same tools when we first getting   started, but for me I just use Automate the Boring  Stuff. They really walk you through kind of the   things you need to know first, and then building  upon that. It's a book as well as I think there's   some online resources and things like that. So I  would focus on just those kind of getting to know   the basics of Python and once you feel like you've  got a handle on how to do some really basic things   then kind of thinking through what it is  you want to do next and how you can do that.   I definitely agree with Katelyn. That's what I  started was with that book Automate the Boring   Stuff with Python. And just understanding  the variables and the functions, what that   all means is really, I think it's step one to  understand the vocabulary when it comes to Python,   so then when you do dive into, you know, the  how-to videos you understand what they're   saying. You understand how to go about it  more. So definitely start off with more of the   definitions I would say and then diving into the  how-to's and actually connecting it yourself. So.   Yeah, yeah that's good advice. I think that, you  know, if you don't know anything about Python, it   might seem kind of dry, but some of the examples  you showed today, I mean those are pretty powerful   and really help, you know, make your job much  more efficient. So it's worthwhile kind of   jumping in and trying to figure it out because  you'll discover a lot of fun things to do.   We've got another question here - so this pertains  to versions. So how often is Python updated? Like   a code base. And are there big differences in  capabilities between versions? So I guess the   question really would be do I need to be checking  on an updated version of the code base, and do I   need to update that right away based on new and  evolving capabilities of Python? What would you   guys suggest and where do you check to make sure  that you're up to date? I will say that Python is   changing all the time. As with any coding language  it's always changing. But I don't know Katelyn,   do you have a resource of how to check that?  Yeah I typically just keep an eye on the Python.   Python.org is their website. I will say  that they don't do - they do little updates,   but nothing truly major. I’ve never had something  I’ve built break because of anything with changing   in the language. I would say usually that uh  just kind of keeping an eye on that. Maybe   subscribing to a couple blogs or things like  that that keep an eye on that just so, you know,   if things are changing. But for the most part I  would say it's pretty adaptable, and even when   they make changes I’ve never seen an impact on the  things that I’ve already created. If that helps.   Yeah great thank you for that. And I think  that's the end of our questions here that   have been submitted, so let's go ahead  and wrap up. As I put in the chat today   we have developed a knowledge management hub  for you on YouTube which you can subscribe to.   You can find our channel at this  particular link and you can find   all of our webinars on demand at  nwsdigital.com/webinar-recordings.   So thanks again everyone for attending. We hope  you learned a lot about Python this morning. It   was a great intro into Python. We hope to see  you at one of our upcoming webinars, and until   then have a great day, stay safe, and have a  great rest of your week. Thank you very much.
Info
Channel: Northwoods
Views: 913
Rating: 5 out of 5
Keywords: python, digital marketing
Id: Fr0btAtnF2c
Channel Id: undefined
Length: 44min 52sec (2692 seconds)
Published: Fri Mar 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.