Giter Club home page Giter Club logo

Comments (16)

khalwat avatar khalwat commented on May 28, 2024

I was actually just mulling this over last night, in terms of whether it should be included in SEOmatic or not.

I think it's close, from the POV that it's not entirely related to SEO, but it's still something semi-related that maybe could be stuck in there.

If I did it, it would be that you pasted the whole script tag in though, I think, not just the ID... because sometimes you want customize things in the script, and Google does change it from time to time as well.

For instance, if you want Enable Demographics and Interest Reports you need to ad a line of code to the script tag:

https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad#trackingcode

I'm open to a discussion on whether it should be included, and how to handle it!

from seomatic.

timkelty avatar timkelty commented on May 28, 2024

Yeah I was on the fence whether it belonged, but I think it would be convenient for sure.

Dumping the whole script tag would probably be best for most people. In our case - we actually use the ID directly sometimes and build our own script.

But in that case, it wouldn't really matter - we could still use the field, only put our ID in, and just override the template to not dump the script tag and do whatever we wanted with it.

from seomatic.

sg-modlab avatar sg-modlab commented on May 28, 2024

I see this as feature bloat FWIW.

There's Analytics, Tag Manager, Piwik and they change ... put under body,
in head, before close yada yada ... then you don't want them in this
environment or that. You don't want them in live preview ....

Just cause SEO lives in head doesn't mean this plugin should also manage
stylesheets, scripts, analytics, ...

So easy to be done with a global or environment variable, too.

Again. just my $.02

On Wed, Feb 3, 2016 at 12:05 PM, Tim Kelty [email protected] wrote:

Yeah I was on the fence whether it belonged, but I think it would be
convenient for sure.

Dumping the whole script tag would probably be best for most people. In
our case - we actually use the ID directly sometimes and build our own
script.

But in that case, it wouldn't really matter - we could still use the
field, only put our ID in, and just override the template to not dump the
script tag and do whatever we wanted with it.


Reply to this email directly or view it on GitHub
#19 (comment)
.

seth giammanco
[email protected]
ph 718.858.1066

minds on design lab
www.mod-lab.com
Subscribe to our Mailing List
https://confirmsubscription.com/h/y/12431274F3870FEA

from seomatic.

khalwat avatar khalwat commented on May 28, 2024

So I've vacillated back and forth on it for a while. Part of me wanted it in there so I didn't need a Twig template for it; part of me found no good place for it to fit into the SEOmatic settings, which made me think that maybe it was a bit of as @sg-modlab termed it, feature bloat.

I think some of the changes I have coming for 1.1.0 are a bit more useful for the core SEO functionality, and I wonder if something like an integrated sitemap wouldn't be more useful from the POV of it being an total SEO solution out of the box.

from seomatic.

sg-modlab avatar sg-modlab commented on May 28, 2024

Sitemap makes sense to me.

Sent from my iPhone

On Feb 3, 2016, at 12:56 PM, khalwat [email protected] wrote:

So I've vacillated back and forth on it for a while. Part of me wanted it in there so I didn't need a Twig template for it; part of me found no good place for it to fit into the SEOmatic settings, which made me think that maybe it was a bit of as @sg-modlab termed it, feature bloat.

I think some of the changes I have coming for 1.1.0 are a bit more useful for the core SEO functionality, and I wonder if something like an integrated sitemap wouldn't be more useful from the POV of it being an total SEO solution out of the box.


Reply to this email directly or view it on GitHub.

from seomatic.

lindseydiloreto avatar lindseydiloreto commented on May 28, 2024

+1 for including the GA script. I'd love to just enter our code into the SEOmatic settings and be done with it.

Adding a sitemap makes a lot of sense to me as well, although Ben Croker already pretty much nailed it with his Sitemap plugin.

from seomatic.

timkelty avatar timkelty commented on May 28, 2024

I could go either way - but I'm leaning towards it being feature bloat.

What if the setting were merely labelled: Additional content for seomaticRender hook?
Then you could put whatever in there, GA script or not. No assumptions about where or what it does.

from seomatic.

khalwat avatar khalwat commented on May 28, 2024

So I discussed this on http://craftcms.slack.com with @lindseydiloreto and I think we came to a consensus that I tend to agree with:

People who want the quick and easy solution can just paste the Google Analytics UID into a field, and SEOmatic will do the right thing.

For people who don't want it, or have custom modifications to the GA script for adding additional features, or they want to control where it goes or whatever, they can just leave it blank.

Basically, make it super easy and simple for people who want that. For people who want it custom, just leave the field blank and keep doing it your way.

The reasoning is basically this: the field is a convenience that is more than fine for the majority of sites; and if you want to do something special, no problem, just leave the field blank (just like with the Google Verification Code). Realistically, Google doesn't really update the script portion at all, it's just a simple loader for the actual GA code.

I'll do it the right way, via a variable that's included in the _seo_meta template, and so on. Also it will do smart things, like not include the GA code if you're running in devMode and so on.

from seomatic.

sg-modlab avatar sg-modlab commented on May 28, 2024

Thanks for sharing ... Goes down a path I think too many plugins go where they lose focus and simplicity because of addressing too many needs; however simple or ignorable they may seem.

Can I load my CSS, favicons, scripts and anything else that seems like meta because it may go into the head? Guess we'll see those in a future release ;-)

I enjoy being a part of the conversation and hope my contributions are seen as nothing but that.

Best

Sent from my iPhone

On Feb 3, 2016, at 2:32 PM, khalwat [email protected] wrote:

So I discussed this on http://craftcms.slack.com with @lindseydiloreto and I think we came to a consensus that I tend to agree with:

People who want the quick and easy solution can just paste the Google Analytics UID into a field, and SEOmatic will do the right thing.

For people who don't want it, or have custom modifications to the GA script for adding additional features, or they want to control where it goes or whatever, they can just leave it blank.

Basically, make it super easy and simple for people who want that. For people who want it custom, just leave the field blank and keep doing it your way.

The reasoning is basically this: the field is a convenience that is more than fine for the majority of sites; and if you want to do something special, no problem, just leave the field blank (just like with the Google Verification Code). Realistically, Google doesn't really update the script portion at all, it's just a simple loader for the actual GA code.

I'll do it the right way, via a variable that's included in the _seo_meta template, and so on. Also it will do smart things, like not include the GA code if you're running in devMode and so on.


Reply to this email directly or view it on GitHub.

from seomatic.

timkelty avatar timkelty commented on May 28, 2024

Realistically, Google doesn't really update the script portion at all

While this may be true, this seems like a nightmare in terms of support.

from seomatic.

khalwat avatar khalwat commented on May 28, 2024

While this may be true, this seems like a nightmare in terms of support

Well, there are two ways to think about it. The vast, vast majority of websites will never update their GA code at all. Ever. Most sites are created, paid for by the client, and away they go.

So I don't really see it as any worse of a support nightmare than already exists. It might actually be better, because I'm more likely to update the GA code than most. :)

from seomatic.

lindseydiloreto avatar lindseydiloreto commented on May 28, 2024

According to hypothetical statistics I'm completely making up, it seems far more likely that:

  1. @khalwat would update the GA implementation in SEOmatic.
  2. A dev would update the SEOmatic plugin.

... rather than:

  1. A dev re-implements the GA code just to get the latest format.

To me, it seems like a fairly small feature which would actually be helpful to a lot of people. And as a small feature, it doesn't tread very heavily into feature bloat territory.

Just speculating, of course. :)

from seomatic.

khalwat avatar khalwat commented on May 28, 2024

And away we go...
safariscreensnapz207
safariscreensnapz211

from seomatic.

jasonmccallister avatar jasonmccallister commented on May 28, 2024

This is great to add this, but the ability to append extra to the analytics tag is critical. For example, we would need commerce on several projects.

To be fair, love this implementation. I just would like to be able to add GA specific code as well.

from seomatic.

khalwat avatar khalwat commented on May 28, 2024

@themccallister I got yer back:

safariscreensnapz213

safariscreensnapz214

In addition to turning on whatever Google Analytics plugins you need, you can also control whether it automatically sends a PageView or not.

from seomatic.

khalwat avatar khalwat commented on May 28, 2024

Implemented in 1.1.0, which is now released.

from seomatic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.