Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRAWLERA-6612] Rebranding, updated GA code #5072

Merged
merged 1 commit into from Apr 1, 2021

Conversation

zloidemon
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #5072 (5189434) into master (1d20025) will decrease coverage by 0.17%.
The diff coverage is n/a.

❗ Current head 5189434 differs from pull request most recent head 90fe494. Consider uploading reports for the commit 90fe494 to get more accurate results

@@            Coverage Diff             @@
##           master    #5072      +/-   ##
==========================================
- Coverage   88.19%   88.01%   -0.18%     
==========================================
  Files         162      162              
  Lines       10300    10300              
  Branches     1500     1500              
==========================================
- Hits         9084     9066      -18     
- Misses        947      965      +18     
  Partials      269      269              
Impacted Files Coverage Δ
scrapy/robotstxt.py 75.30% <0.00%> (-22.23%) ⬇️

@@ -3,14 +3,9 @@
{% block footer %}
{{ super() }}
<script type="text/javascript">
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just not needed anymore?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"legacy Segment tracking code. I don’t think we use Segment anymore."

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Only GA code needs to be updated

@wRAR wRAR marked this pull request as draft April 1, 2021 10:25
@@ -3,14 +3,9 @@
{% block footer %}
{{ super() }}
<script type="text/javascript">
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Only GA code needs to be updated

@wRAR wRAR marked this pull request as ready for review April 1, 2021 11:58
@kmike kmike merged commit 9a91586 into scrapy:master Apr 1, 2021
@Gallaecio
Copy link
Member

@zseta @zloidemon The analytics code seems to fail now due to the removed line, because now the analytics JavaScript variable is not defined.

@Laerte
Copy link
Member

Laerte commented Mar 24, 2023

@Gallaecio Should we rollback the code (but keeping new domain)?

I saw this PR:

But this not belong to scrapy.org repo since the issue in here on docs (maybe move to scrapy repo then).

@wRAR
Copy link
Member

wRAR commented Mar 24, 2023

Looks like that issue is both about scrapy.org and docs.scrapy.org (maybe they are even caused by different pieces of code?)

@Gallaecio
Copy link
Member

Indeed. Let’s create a separate issue to deal with the docs.scrapy.org issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants