Giter Club home page Giter Club logo

seo's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

seo's Issues

Error when attempting to create & view new Keywords

When I attempt to make a Keyword #17 in the demo app through Nova, I am redirected to a 404 page once I attempt to create a resource. If I navigate back to the Keywords page in Nova, it does not appear that I have any Keywords created. Although if I view the database, it appears that a entry was added to some extent.

Screen where I provide input for the new keyword:

Screen Shot 2021-04-14 at 11 20 02 PM

It appears that the record was created, but I receive a 404 error:

Screen Shot 2021-04-14 at 11 22 03 PM

The result of running a query on the database showing the inserted record:

Screen Shot 2021-04-14 at 11 23 47 PM

Additional note: not quite sure if it's related, but I'm having difficulties accessing the Keyword after this process in other resources as well. Even though the database entry is there, I'm not seeing it show up in other resources.

Screen Shot 2021-04-14 at 11 33 31 PM

Keywords

Keywords are stored lowercase and need to have the ability for slight variations to be grouped together with a parent keyword relationship.

Keywords will also belong to a Keyword Type (#16).

Keywords are created in each project by the Admin, Owners or Staff roles (TIPOFF/authorization#21) in the admin section (Laravel Nova).

Datetime for tracking requested and for when a keyword should no longer be tracked in the Rankings.

Later there will be options to approve ones that can be pulled from the Google Search Console API.

Providers

This package currently pulls Google Rankings (#18) through the SerpAPI provider in the tipoff/laravel-serpapi package but I want to make sure everything is implemented so that we can switch out providers or make other providers optional in the future. I want to implement it in a similar approach to Flysystem:

Results

Rankings (#18) should be broken out from one large table with nullable fields of each position to have a set of Results in a table for each Ranking. The Results will have a Type for each of the SERP sections (Organic Listing, Local Listing, Featured Snippet, Inline Video Listings, etc). This will also allow the results to be much more flexible in the future.

Keywords bug fixes

  • Fix 'active' scope query
  • Add phrase to index view
  • Update unique phrase validation - create & update rules
  • attach search locale select box displays serp_id change to display name
  • search locale index view to display name

Rankings

SEO rankings will be fetched for Local Keywords (#17) with SerpApi and stored in the database. These will be pulled on the first of the month and once weekly (I prefer Wednesdays).

Rankings will just look at the first page of search results. They will have the 10 spots created as a relationship to Webpages and any Local Maps SERP that appears in the results will also have the 3 Map Pack listings saved as Places (#15).

Keyword Types

Keyword Types include:

  • Branded
  • Generic
  • Local

Keywords will have a one-to-many relationship with Keyword Types.

formatted_title for Domain & Webpage models

We need to create an accessor on the domain model for formatted_title which concatenates the 'https://' .{domain->name}. '.' .{domain->tld}

Then we need to do the same thing for the formatted Webpage output

Place Data

Expanding on the Places (#15) model, I want to save the details about places from the Google Places API.

This should be done in such a way that the Places associated with Competitors (TIPOFF/reviews#19) are checked regularly (perhaps weekly or monthly) to find out when details are updated. It will be structured where we can see versions of the updates so we know what was changed when. This is extremely important in regards to the business name, address, etc. but is also important to know when these Places are changing their hours of operation. I think I want to breakout out the general details into a separate table from the hours of operation table.

Permissions Migrations

  • bump dependency of tipoff/authorization to 2.5.0
  • Verify all permissions in the policies are included in the package permissions migration
  • Add arrays after every permission in that migration except delete to include the ‘Owner’ role
  • Also add the ‘Staff’ role to the array for every view permission

example from the Fees package:

    public function up()
    {
        $permissions = [
             'view fees' => ['Owner', 'Staff'],
             'create fees' => ['Owner'],
             'update fees' => ['Owner'],
             'delete fees' => [],   // Admin only
        ];

        $this->createPermissions($permissions);
    }

OAuth vs Keys

@drewroberts I see we have Keys to add the API keys, but I believe this requires each company to add their API keys for each product. I just want to confirm this is still the direction you want to go and not have OAuth to pull in the keys automatically for each account.
@phuclh

Places

Places are the tracked Google Places that will require a Google Places ID and the remainder of the details will be pulled by the API.

When these are pulled, a Company (#13) will be created for each new Domain (#14) name. After creation, the company will not ever be updated by the application code.

I would like for these to eventually be refactored to use the new version of Address (TIPOFF/addresses#19).

They will have an optional relationship where it belongs to a Market (TIPOFF/locations#41) if the tipoff/locations package is also included.

Domains

Domains are the core model of this package. They will be saved as the root domain name with a TLD.

Domains will have an optional One to One relationship with Companies (#13) and also contain additional fields from the Domain RDAP API and we will use a scraper to store the Domain's Favicon and other information.

Company Profile Links

Similar to User Profile Links (TIPOFF/authorization#27), Companies (#13) will be updated with Links to their own website and to their social media profiles. I will probably call the model Profile Links because it will also be used for the profiles of Locations (TIPOFF/locations#42) and potentially other polymorphic relationships.

Since these Links will depend on the Domains (#14) & Webpages (#19) models of this SEO package, it makes sense to add them to this package instead of the tipoff/authorization package.

Companies

Companies will be either the company for the application or a competitor company. They will be used for Locations and for Places. They must have a unique website domain.

Documentation

Need to update the README file to keep it current with package features and document how to best utilize it in a Laravel project.

Company Users

There will be a many to many relationship with a pivot table for Company (#13) and User (TIPOFF/authorization#20) and it will be implemented similar to Teams in Laravel Spark. There should also be additional fields in the pivot table:

  • timestamps
  • creator
  • updater
  • primary_contact (boolean)

The primary contact should only have one relationship with a true value per Company.

There will be a unique key for company_id and user_id.

SEO minor fixes

  • update business categories, company, domains index view to display name
  • fix unique constraint on business category, company and domain edit pages
  • cast date in ranking model
  • ranking nova resource missing keywords relationship
  • on deleting search locale delete corresponding record from "keyword_search_locale" table

Search Volume

Monthly Search Volume for Keywords (#17) will be pulled monthly from estimates on both SerpAPI and Google Search Ads. The most accurate will be from the project's own Company (#13) when it consistently ranks in the first few results on the first page of Google results and will be pulled from Google Search Console.

Search Locales

For the search Rankings (#18) we need to create a model for Search Locales and add a relationship to them. More info in the SerpApi documentation:

I don't want to get too granular with these. For this package, I just want to use the United States as the default Search Locale and then create one for all 210 of the DMA Regions (TIPOFF/addresses#42) in the United States.

Webpages

Webpages are exact URL's in search results (Rankings #18) that will be stored in a different table, so their movement in the Rankings will be documented. They belong to a Domain (#14) but in many cases, the Domain will not have a Company (#13).

When new Webpages are created, a domain will also be created, but a Company will not be created. New Companies are only created through the Google Places API.

Tests

Need to implement tests for every feature of the package.

Test GetOrganicResults job with sitelinks expanded UNIQUE constraint failed

Снимок экрана 2021-05-04 в 12 57 04

Error happened if use JSON response from SERP API documentation

Снимок экрана 2021-05-04 в 13 02 23

Json response from GetOrganicResultsTest:
  "organic_results": [
      {
          "position": 1,
          "title": "Apple",
          "link": "https://www.apple.com/",
          "displayed_link": "https://www.apple.com/",
          "snippet": "Discover the innovative world of Apple and shop everything iPhone, iPad, Apple Watch, Mac, and Apple TV, plus explore accessories, entertainment, and expert device support.",
          "sitelinks_search_box": true,
          "sitelinks": {
              "expanded": [
                  {
                      "title": "iPhone",
                      "link": "https://www.apple.com/iphone/",
                      "snippet": "Explore iPhone, the world`s ..."
                  },
                  {
                      "title": "iPad",
                      "link": "https://www.apple.com/ipad/",
                      "snippet": "Compare iPad Models - iPad mini 4 - iPad Accessories - ..."
                  },
                  {
                      "title": "Mac",
                      "link": "https://www.apple.com/mac/",
                      "snippet": "MacBook Pro - MacBook - MacBook Air - iMac - Compare"
                  },
                  {
                      "title": "Music",
                      "link": "https://www.apple.com/music/",
                      "snippet": "Listen to your favorite music ad-free on all your devices, online ..."
                  },
                  {
                      "title": "Apple Support",
                      "link": "https://support.apple.com/",
                      "snippet": "Apple support is here to help. Learn more about popular ..."
                  },
                  {
                      "title": "Accessories",
                      "link": "https://www.apple.com/shop/accessories/all-accessories",
                      "snippet": "Shop Apple accessories for Apple Watch, iPhone, iPad, iPod, and ..."
                  }
              ]
          },
          "cached_page_link": "https://webcache.googleusercontent.com/search?q=cache:xEELJvdODswJ:https://www.apple.com/+&cd=1&hl=en&ct=clnk&gl=us"
      }
  ]

I think this case should be handled, if it can happen with real response data

Business Categories

Expanding on the Places (#15) model, I want to save the Industry categories from the Google Places API. These should be saved into an Industries model that then has a many-to-many relationship with Places.

Keyword Search volume

  • Use the google search console to pull the search volume for a keyword
  • Create Nova Resource and hide it from the navigation.
  • Add Nova resource to Keyword, so we can see data of a keyword.
  • add the Spark Line or Chart for Search Volume.
  • Implement checkSearchVolume(Keyword $keyword) method for each Provider.
  • On-demand queue if using command?

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.