Implement Google AnalyticsScript in our code pen portfolio?

Implement Google AnalyticsScript in our code pen portfolio?
0.0 0

#1

Hi,

In order for me to get actual data about my codepen I was wondering if I could include the Google Analytics tracking code? (I have a domain name dying to receive a real website :slight_smile: so until then, I could use the GA script to get data about my project.

Has anyone done that before? Is it ok to do it?


#2

I’m not sure if it would work, but there is only one way to find out! If it did work, it might give you a few extra insights other than what codepen already provides.


#3

i was more worried about the codepen policy . it is possible to do it. if it works out I will post a tutorial for those who want to do it.

Cheers!


#4

You could also run your pen (debug URL) through PageSpeed Insights.


#5

Thanks, but done already, forgot to mention it :slight_smile: At least I think we are talking about the same tool.
TestMySiteGoogle

By the way now that you are mentioning it, the javascript belonging to codepen seems to slow things down.
Do you think it’s that significant?
And while we are mentioning this:
Do you know what that means:

"Eliminate render-blocking JavaScript and CSS in above-the-fold content"
I quoted that from the report.


#6

https://developers.google.com/speed/docs/insights/BlockingJS


#7

As an experiment, added HTML async attribute (<script async src="my.js">) to all external scripts on my portfolio page. Results changed from top to bottom set of scores.


#8

Nice! Thanks for the feedback


#9

FYI:

I set up a new property in my Google Analytics account and implemented the tracking code in both my pens, we will see what happens :wink: