Linus Larsson's blog

Using clipboard to import and export data in R

Published on February 7, 2019 in R

With this script you can create vectors or data frames in R simply by marking the data you want and copy it to the clipboard. Then one simple line in R will import the data from the clipboard and structure it correctly. This is super useful when working with Excel or when you’re browsing the...

Continue reading »

Scraping Trustpilot Reviews With R

Published on February 3, 2019 in R

First of all, I have to give a huge load of credit to Fredrik Cederlöf, who published a script for scraping Trustpilot that inspired me to write my own version that could scrape all relevant attributes for the reviews.  If you’re only interested in downloading the data you could simply install my library instead of recreating...

Continue reading »

Detailed Attribution in Google Analytics 360

Published on January 31, 2019 in R

Are you ready to get you mind blown away? This R script is probably the best script in the world. Well maybe not, but it’s definitely up there in the top. What the script will produce is the output below. If you are currently using Google Analytics 360 and you have connected it to Google...

Continue reading »

Google Analytics Related Products with R

Published on January 22, 2019 in R

I finally managed to create something really beautiful! With the following script in R you will be able to find out what products your visitors are buying in the same transaction. I will explain how it works one piece at a time. It’s never a good idea to simply copy paste a script without understanding...

Continue reading »

Import Google Analytics data to BigQuery without 360

Published on January 16, 2019 in R

Wouldn’t it be great if you could store your Google Analytics data in BigQuery without having to pay for a Google Analytics 360 license? With this script in R you could do just that. Although, you will not get all the detailed data that you get with the 360 connection. If you decide to import...

Continue reading »

Tracking meta tags with Google Tag Manager

Published on January 15, 2019 in GTM

This is a very useful function that I have used quite a lot. Maybe you want to import the meta description for each page to Google Analytics or perhaps the developers have made some variables available in meta tags instead of using a data layer. Of course you could make the information available in the...

Continue reading »

Conversion rate per page in Google Analytics with R

Published on January 7, 2019 in Analytics

I often get questions about how to evaluate if a page has been useful in the customer journey on the website. You could check this by a lot of different KPIs but many of them aren’t very good. For example, I think page value is an irrelevant metric since Google analytics will split the transaction...

Continue reading »

Running initial code only once in R script

Published on December 10, 2018 in R

This script helped me a lot once I figured it out. When I work in R I usually split different functions in different script files and then import them to the “main” script, but if you do this you don’t want  to import all functions each time you run the script. So how can you...

Continue reading »

1 2 3

© Copyright - Lynuhs.com - 2018-2021