mencoro 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -5
- data/docs/AccountApi.md +1 -1
- data/docs/AnalyticsApi.md +96 -86
- data/docs/AsyncJobResource.md +3 -1
- data/docs/AsyncJobResourceError.md +20 -0
- data/docs/BillingApi.md +1 -1
- data/docs/CitedSourceRow.md +32 -0
- data/docs/CitedSourcesResponse.md +20 -0
- data/docs/ClusterBreakdownRow.md +82 -0
- data/docs/ClustersApi.md +74 -0
- data/docs/CompetitorCoOccurrenceResponse.md +18 -0
- data/docs/CompetitorCoOccurrenceRow.md +36 -0
- data/docs/CompetitorShareOfVoice.md +20 -0
- data/docs/CreateInvitation201Response.md +4 -0
- data/docs/CreateInvitationRequest.md +3 -1
- data/docs/CreateInvitationRequestProjectAccess.md +20 -0
- data/docs/DiscoveryApi.md +1 -1
- data/docs/GetMeStats200ResponseProjects.md +1 -1
- data/docs/GetOrganizationOverview200ResponseAggregate.md +1 -1
- data/docs/GetOrganizationOverview200ResponseProjectsInner.md +8 -2
- data/docs/GetOrganizationStats200ResponseInvitations.md +1 -1
- data/docs/GetOrganizationStats200ResponseMembers.md +1 -1
- data/docs/GetOrganizationStats200ResponseProjects.md +1 -1
- data/docs/InvitationResource.md +5 -1
- data/docs/JobsApi.md +1 -1
- data/docs/KeywordListingResource.md +12 -10
- data/docs/KeywordListingResourceCarriedPositions.md +24 -0
- data/docs/KeywordListingResourceCarriedPositionsSerp.md +20 -0
- data/docs/ListProjects200Response.md +1 -1
- data/docs/MemberResource.md +5 -1
- data/docs/MembersApi.md +78 -0
- data/docs/MentionMatchResource.md +44 -0
- data/docs/MentionSampleResponse.md +46 -0
- data/docs/MentionTypeCounts.md +26 -0
- data/docs/OrganizationsApi.md +3 -3
- data/docs/PerCompetitorSentiment.md +30 -0
- data/docs/PerEngineSentiment.md +28 -0
- data/docs/PerEntityMetrics.md +32 -0
- data/docs/PositionDistributionBucket.md +20 -0
- data/docs/ProjectMentionMixResponse.md +22 -0
- data/docs/ProjectMentionSamplesResponse.md +20 -0
- data/docs/ProjectRankTrackingClusterBreakdown.md +20 -0
- data/docs/ProjectRankTrackingStats.md +96 -0
- data/docs/ProjectRankTrackingTimeSeries.md +20 -0
- data/docs/ProjectSentimentBreakdown.md +20 -0
- data/docs/ProjectedMonthlyChecksResource.md +2 -2
- data/docs/ProjectsApi.md +76 -2
- data/docs/SearchTrackedQueryMentionMatches200Response.md +20 -0
- data/docs/SearchTrackedQuerySerpMatches200Response.md +20 -0
- data/docs/SerpMatchResource.md +30 -0
- data/docs/SetMemberProjectAccessRequest.md +20 -0
- data/docs/SubscriptionResource.md +1 -1
- data/docs/TimeSeriesPoint.md +22 -0
- data/docs/TrackedQueriesApi.md +175 -3
- data/docs/TrackedQueryCountResource.md +1 -1
- data/docs/TrackedQueryMoverRow.md +58 -0
- data/docs/TrackedQueryMoversResponse.md +22 -0
- data/docs/TrackedQueryRankTrackingTimeSeries.md +20 -0
- data/docs/TrackedQueryUsageResource.md +1 -1
- data/lib/mencoro/api/account_api.rb +3 -3
- data/lib/mencoro/api/analytics_api.rb +103 -85
- data/lib/mencoro/api/billing_api.rb +3 -3
- data/lib/mencoro/api/captures_api.rb +2 -2
- data/lib/mencoro/api/clusters_api.rb +76 -1
- data/lib/mencoro/api/discovery_api.rb +3 -3
- data/lib/mencoro/api/invitations_api.rb +1 -1
- data/lib/mencoro/api/jobs_api.rb +3 -3
- data/lib/mencoro/api/members_api.rb +95 -1
- data/lib/mencoro/api/organization_operations_api.rb +1 -1
- data/lib/mencoro/api/organizations_api.rb +7 -7
- data/lib/mencoro/api/projects_api.rb +80 -5
- data/lib/mencoro/api/tracked_queries_api.rb +220 -8
- data/lib/mencoro/api_client.rb +2 -2
- data/lib/mencoro/api_error.rb +1 -1
- data/lib/mencoro/api_model_base.rb +1 -1
- data/lib/mencoro/configuration.rb +1 -1
- data/lib/mencoro/models/accepted_job_resource.rb +1 -1
- data/lib/mencoro/models/ai_response_report_resource.rb +1 -1
- data/lib/mencoro/models/ai_response_resource.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_clusters_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_skipped_clusters_inner.rb +1 -1
- data/lib/mencoro/models/apply_clustering_job_outcome_successful_inner.rb +1 -1
- data/lib/mencoro/models/async_job_resource.rb +17 -7
- data/lib/mencoro/models/async_job_resource_error.rb +217 -0
- data/lib/mencoro/models/batch_change_tracked_query_check_frequency_request_data.rb +1 -1
- data/lib/mencoro/models/batch_change_tracked_query_passes_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_outcome_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_query_clusters_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_request_data.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_create_tracked_queries_result_resource_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_force_check_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_force_check_tracked_queries200_response_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response_failed_inner.rb +1 -1
- data/lib/mencoro/models/batch_pause_tracked_queries200_response_successful_inner.rb +1 -1
- data/lib/mencoro/models/batch_resume_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/batch_targets_request_data.rb +1 -1
- data/lib/mencoro/models/batch_write_outcome.rb +1 -1
- data/lib/mencoro/models/batch_write_outcome_failed_inner.rb +1 -1
- data/lib/mencoro/models/brand_profile_resource.rb +1 -1
- data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/bulk_add_clusters_to_tracked_queries_request.rb +1 -1
- data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/bulk_remove_clusters_from_tracked_queries_request.rb +1 -1
- data/lib/mencoro/models/change_member_role_request.rb +1 -1
- data/lib/mencoro/models/change_tracked_query_check_frequency_request_data.rb +1 -1
- data/lib/mencoro/models/change_tracked_query_passes_request_data.rb +1 -1
- data/lib/mencoro/models/citation_resource.rb +1 -1
- data/lib/mencoro/models/cited_source_row.rb +298 -0
- data/lib/mencoro/models/cited_sources_response.rb +192 -0
- data/lib/mencoro/models/cluster_breakdown_row.rb +580 -0
- data/lib/mencoro/models/cluster_membership_request_data.rb +1 -1
- data/lib/mencoro/models/competitor_co_occurrence_response.rb +166 -0
- data/lib/mencoro/models/competitor_co_occurrence_row.rb +318 -0
- data/lib/mencoro/models/competitor_resource.rb +1 -1
- data/lib/mencoro/models/competitor_share_of_voice.rb +174 -0
- data/lib/mencoro/models/create_competitor_request.rb +1 -1
- data/lib/mencoro/models/create_invitation200_response.rb +1 -1
- data/lib/mencoro/models/create_invitation201_response.rb +60 -2
- data/lib/mencoro/models/create_invitation_request.rb +15 -5
- data/lib/mencoro/models/create_invitation_request_project_access.rb +201 -0
- data/lib/mencoro/models/create_organization201_response.rb +1 -1
- data/lib/mencoro/models/create_organization_request.rb +1 -1
- data/lib/mencoro/models/create_project_request.rb +1 -1
- data/lib/mencoro/models/create_project_request_competitors_inner.rb +1 -1
- data/lib/mencoro/models/create_query_cluster409_response.rb +1 -1
- data/lib/mencoro/models/create_query_cluster_request.rb +1 -1
- data/lib/mencoro/models/delete_query_cluster200_response.rb +1 -1
- data/lib/mencoro/models/entitlements_resource.rb +1 -1
- data/lib/mencoro/models/get_available_filters200_response.rb +1 -1
- data/lib/mencoro/models/get_available_filters200_response_clusters_inner.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response_organizations.rb +1 -1
- data/lib/mencoro/models/get_me_stats200_response_projects.rb +2 -2
- data/lib/mencoro/models/get_membership_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_mention_samples400_response.rb +1 -1
- data/lib/mencoro/models/get_mention_samples400_response_details_value_inner.rb +1 -1
- data/lib/mencoro/models/get_metric_glossary200_response.rb +1 -1
- data/lib/mencoro/models/get_metric_glossary200_response_metrics_inner.rb +1 -1
- data/lib/mencoro/models/get_organization_overview200_response.rb +1 -1
- data/lib/mencoro/models/get_organization_overview200_response_aggregate.rb +2 -2
- data/lib/mencoro/models/get_organization_overview200_response_projects_inner.rb +34 -3
- data/lib/mencoro/models/get_organization_stats200_response.rb +1 -1
- data/lib/mencoro/models/get_organization_stats200_response_invitations.rb +4 -7
- data/lib/mencoro/models/get_organization_stats200_response_members.rb +4 -7
- data/lib/mencoro/models/get_organization_stats200_response_projects.rb +2 -2
- data/lib/mencoro/models/get_share_of_voice_formula200_response.rb +1 -1
- data/lib/mencoro/models/get_tracking_coverage200_response.rb +1 -1
- data/lib/mencoro/models/get_tracking_coverage200_response_sample_inner.rb +1 -1
- data/lib/mencoro/models/invitation_resource.rb +64 -6
- data/lib/mencoro/models/keyword_listing_resource.rb +40 -14
- data/lib/mencoro/models/keyword_listing_resource_carried_positions.rb +187 -0
- data/lib/mencoro/models/keyword_listing_resource_carried_positions_serp.rb +192 -0
- data/lib/mencoro/models/keyword_listing_resource_mention_type_counts.rb +1 -1
- data/lib/mencoro/models/list_ai_responses200_response.rb +1 -1
- data/lib/mencoro/models/list_competitors200_response.rb +1 -1
- data/lib/mencoro/models/list_invitations200_response.rb +1 -1
- data/lib/mencoro/models/list_keyword_listings200_response.rb +1 -1
- data/lib/mencoro/models/list_members200_response.rb +1 -1
- data/lib/mencoro/models/list_organizations200_response.rb +1 -1
- data/lib/mencoro/models/list_projects200_response.rb +2 -2
- data/lib/mencoro/models/list_query_clusters200_response.rb +1 -1
- data/lib/mencoro/models/list_search_snapshots200_response.rb +1 -1
- data/lib/mencoro/models/list_shopping_snapshots200_response.rb +1 -1
- data/lib/mencoro/models/me_resource.rb +1 -1
- data/lib/mencoro/models/member_resource.rb +63 -5
- data/lib/mencoro/models/mention_match_resource.rb +432 -0
- data/lib/mencoro/models/mention_sample_response.rb +450 -0
- data/lib/mencoro/models/mention_type_counts.rb +268 -0
- data/lib/mencoro/models/operation_effect.rb +1 -1
- data/lib/mencoro/models/organization_resource.rb +1 -1
- data/lib/mencoro/models/per_competitor_sentiment.rb +304 -0
- data/lib/mencoro/models/per_engine_sentiment.rb +278 -0
- data/lib/mencoro/models/per_entity_metrics.rb +218 -0
- data/lib/mencoro/models/position_distribution_bucket.rb +190 -0
- data/lib/mencoro/models/preview_organization_operation200_response.rb +1 -1
- data/lib/mencoro/models/preview_organization_operation200_response_organization.rb +1 -1
- data/lib/mencoro/models/preview_organization_operation_request.rb +3 -3
- data/lib/mencoro/models/project_detail_resource.rb +1 -1
- data/lib/mencoro/models/project_detail_resource_competitors_inner.rb +1 -1
- data/lib/mencoro/models/project_mention_mix_response.rb +222 -0
- data/lib/mencoro/models/project_mention_samples_response.rb +192 -0
- data/lib/mencoro/models/project_rank_tracking_cluster_breakdown.rb +176 -0
- data/lib/mencoro/models/project_rank_tracking_stats.rb +718 -0
- data/lib/mencoro/models/project_rank_tracking_time_series.rb +176 -0
- data/lib/mencoro/models/project_resource.rb +1 -1
- data/lib/mencoro/models/project_sentiment_breakdown.rb +194 -0
- data/lib/mencoro/models/projected_monthly_checks_resource.rb +3 -3
- data/lib/mencoro/models/query_cluster_resource.rb +1 -1
- data/lib/mencoro/models/report_ai_response_request.rb +1 -1
- data/lib/mencoro/models/search_result_resource.rb +1 -1
- data/lib/mencoro/models/search_snapshot_resource.rb +1 -1
- data/lib/mencoro/models/search_tracked_queries200_response.rb +1 -1
- data/lib/mencoro/models/search_tracked_query_mention_matches200_response.rb +158 -0
- data/lib/mencoro/models/search_tracked_query_serp_matches200_response.rb +158 -0
- data/lib/mencoro/models/serp_match_resource.rb +314 -0
- data/lib/mencoro/models/set_member_project_access_request.rb +200 -0
- data/lib/mencoro/models/shopping_offer_resource.rb +1 -1
- data/lib/mencoro/models/shopping_snapshot_resource.rb +1 -1
- data/lib/mencoro/models/start_brand_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/start_brand_name_suggestion_job_request.rb +1 -1
- data/lib/mencoro/models/start_clustering_job_request_data.rb +1 -1
- data/lib/mencoro/models/start_keyword_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/start_prompt_discovery_job_request.rb +1 -1
- data/lib/mencoro/models/submitted_checks_resource.rb +1 -1
- data/lib/mencoro/models/subscription_resource.rb +3 -3
- data/lib/mencoro/models/time_series_point.rb +218 -0
- data/lib/mencoro/models/tracked_query_count_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_detail_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_mover_row.rb +492 -0
- data/lib/mencoro/models/tracked_query_movers_response.rb +202 -0
- data/lib/mencoro/models/tracked_query_rank_tracking_time_series.rb +176 -0
- data/lib/mencoro/models/tracked_query_resource.rb +3 -3
- data/lib/mencoro/models/tracked_query_usage_resource.rb +2 -2
- data/lib/mencoro/models/update_organization_request.rb +1 -1
- data/lib/mencoro/models/update_project_brand_profile_request.rb +1 -1
- data/lib/mencoro/models/update_project_request.rb +1 -1
- data/lib/mencoro/version.rb +2 -2
- data/lib/mencoro.rb +32 -1
- data/mencoro.gemspec +2 -2
- data/spec/models/async_job_resource_error_spec.rb +46 -0
- data/spec/models/cited_source_row_spec.rb +78 -0
- data/spec/models/cited_sources_response_spec.rb +42 -0
- data/spec/models/cluster_breakdown_row_spec.rb +228 -0
- data/spec/models/competitor_co_occurrence_response_spec.rb +36 -0
- data/spec/models/competitor_co_occurrence_row_spec.rb +90 -0
- data/spec/models/competitor_share_of_voice_spec.rb +42 -0
- data/spec/models/create_invitation_request_project_access_spec.rb +46 -0
- data/spec/models/keyword_listing_resource_carried_positions_serp_spec.rb +42 -0
- data/spec/models/keyword_listing_resource_carried_positions_spec.rb +54 -0
- data/spec/models/mention_match_resource_spec.rb +114 -0
- data/spec/models/mention_sample_response_spec.rb +114 -0
- data/spec/models/mention_type_counts_spec.rb +60 -0
- data/spec/models/per_competitor_sentiment_spec.rb +72 -0
- data/spec/models/per_engine_sentiment_spec.rb +66 -0
- data/spec/models/per_entity_metrics_spec.rb +78 -0
- data/spec/models/position_distribution_bucket_spec.rb +42 -0
- data/spec/models/project_mention_mix_response_spec.rb +48 -0
- data/spec/models/project_mention_samples_response_spec.rb +42 -0
- data/spec/models/project_rank_tracking_cluster_breakdown_spec.rb +42 -0
- data/spec/models/project_rank_tracking_stats_spec.rb +270 -0
- data/spec/models/project_rank_tracking_time_series_spec.rb +42 -0
- data/spec/models/project_sentiment_breakdown_spec.rb +42 -0
- data/spec/models/search_tracked_query_mention_matches200_response_spec.rb +42 -0
- data/spec/models/search_tracked_query_serp_matches200_response_spec.rb +42 -0
- data/spec/models/serp_match_resource_spec.rb +72 -0
- data/spec/models/set_member_project_access_request_spec.rb +46 -0
- data/spec/models/time_series_point_spec.rb +48 -0
- data/spec/models/tracked_query_mover_row_spec.rb +156 -0
- data/spec/models/tracked_query_movers_response_spec.rb +48 -0
- data/spec/models/tracked_query_rank_tracking_time_series_spec.rb +42 -0
- data/spec/spec_helper.rb +1 -1
- metadata +235 -108
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Mencoro API
|
|
3
3
|
|
|
4
|
-
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.
|
|
4
|
+
#Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`. Every write operation requires an `Idempotency-Key` header: a retry carrying the same key and body within 30 days is answered from the stored result without running again; after 30 days the key is forgotten and a retry runs as a new operation.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: support@mencoro.com
|
|
@@ -89,7 +89,7 @@ module Mencoro
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
# Domains and pages the AI answers cited
|
|
92
|
-
# Minimum role: viewer. The sources the answer engines drew on across a project's AI answers over a date window, ranked by how often they were cited. Per source: citationCount, the total number of citations; distinctResponseCount and distinctQueryCount, how many captured answers and tracked queries it appeared in; avgPosition, its average 1-based rank inside the answers' citation lists, where LOWER is better. A null avgPosition means no citation in the window carried a position, not a rank of zero; a null domain or sampleTitle means the citation never carried one. `total` counts the distinct sources matching the window, before paging. The list is UNFILTERED by ownership: the brand's, competitors' and third-party sources sit in the same ranking. Only the AI answer engines (chatgpt, perplexity, google_ai_overview, google_ai_mode) produce citations, so filtering by google_serp or google_shopping is accepted and returns nothing. Citations still behind an answer engine's redirect (a google.com/goto link, whose URL names the engine rather than the source) are excluded, so a source cited only through such links is absent from this list rather than counted as zero.
|
|
92
|
+
# Minimum role: viewer. The sources the answer engines drew on across a project's AI answers over a date window, ranked by how often they were cited. Per source: citationCount, the total number of citations; distinctResponseCount and distinctQueryCount, how many captured answers and tracked queries it appeared in; avgPosition, its average 1-based rank inside the answers' citation lists, where LOWER is better. A null avgPosition means no citation in the window carried a position, not a rank of zero; a null domain or sampleTitle means the citation never carried one. `total` counts the distinct sources matching the window, before paging. The list is UNFILTERED by ownership: the brand's, competitors' and third-party sources sit in the same ranking. Only the AI answer engines (chatgpt, claude, perplexity, google_ai_overview, google_ai_mode) produce citations, so filtering by google_serp or google_shopping is accepted and returns nothing. Citations still behind an answer engine's redirect (a google.com/goto link, whose URL names the engine rather than the source) are excluded, so a source cited only through such links is absent from this list rather than counted as zero.
|
|
93
93
|
# @param organization_id [String]
|
|
94
94
|
# @param project_id [String]
|
|
95
95
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -99,14 +99,14 @@ module Mencoro
|
|
|
99
99
|
# @option opts [String] :group_by Grain of the roll-up: \"domain\" by host, \"page\" by exact URL. (default to 'domain')
|
|
100
100
|
# @option opts [Integer] :limit Page size. A larger value is rejected, never silently reduced. (default to 20)
|
|
101
101
|
# @option opts [Integer] :offset Number of sources to skip. (default to 0)
|
|
102
|
-
# @return [
|
|
102
|
+
# @return [CitedSourcesResponse]
|
|
103
103
|
def get_cited_sources(organization_id, project_id, date_from, date_to, opts = {})
|
|
104
|
-
get_cited_sources_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
105
|
-
|
|
104
|
+
data, _status_code, _headers = get_cited_sources_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
105
|
+
data
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Domains and pages the AI answers cited
|
|
109
|
-
# Minimum role: viewer. The sources the answer engines drew on across a project's AI answers over a date window, ranked by how often they were cited. Per source: citationCount, the total number of citations; distinctResponseCount and distinctQueryCount, how many captured answers and tracked queries it appeared in; avgPosition, its average 1-based rank inside the answers' citation lists, where LOWER is better. A null avgPosition means no citation in the window carried a position, not a rank of zero; a null domain or sampleTitle means the citation never carried one. `total` counts the distinct sources matching the window, before paging. The list is UNFILTERED by ownership: the brand's, competitors' and third-party sources sit in the same ranking. Only the AI answer engines (chatgpt, perplexity, google_ai_overview, google_ai_mode) produce citations, so filtering by google_serp or google_shopping is accepted and returns nothing. Citations still behind an answer engine's redirect (a google.com/goto link, whose URL names the engine rather than the source) are excluded, so a source cited only through such links is absent from this list rather than counted as zero.
|
|
109
|
+
# Minimum role: viewer. The sources the answer engines drew on across a project's AI answers over a date window, ranked by how often they were cited. Per source: citationCount, the total number of citations; distinctResponseCount and distinctQueryCount, how many captured answers and tracked queries it appeared in; avgPosition, its average 1-based rank inside the answers' citation lists, where LOWER is better. A null avgPosition means no citation in the window carried a position, not a rank of zero; a null domain or sampleTitle means the citation never carried one. `total` counts the distinct sources matching the window, before paging. The list is UNFILTERED by ownership: the brand's, competitors' and third-party sources sit in the same ranking. Only the AI answer engines (chatgpt, claude, perplexity, google_ai_overview, google_ai_mode) produce citations, so filtering by google_serp or google_shopping is accepted and returns nothing. Citations still behind an answer engine's redirect (a google.com/goto link, whose URL names the engine rather than the source) are excluded, so a source cited only through such links is absent from this list rather than counted as zero.
|
|
110
110
|
# @param organization_id [String]
|
|
111
111
|
# @param project_id [String]
|
|
112
112
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -116,7 +116,7 @@ module Mencoro
|
|
|
116
116
|
# @option opts [String] :group_by Grain of the roll-up: \"domain\" by host, \"page\" by exact URL. (default to 'domain')
|
|
117
117
|
# @option opts [Integer] :limit Page size. A larger value is rejected, never silently reduced. (default to 20)
|
|
118
118
|
# @option opts [Integer] :offset Number of sources to skip. (default to 0)
|
|
119
|
-
# @return [Array<(
|
|
119
|
+
# @return [Array<(CitedSourcesResponse, Integer, Hash)>] CitedSourcesResponse data, response status code and response headers
|
|
120
120
|
def get_cited_sources_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
121
121
|
if @api_client.config.debugging
|
|
122
122
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_cited_sources ...'
|
|
@@ -137,7 +137,7 @@ module Mencoro
|
|
|
137
137
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
138
138
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_cited_sources"
|
|
139
139
|
end
|
|
140
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
140
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
141
141
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
142
142
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
143
143
|
end
|
|
@@ -171,6 +171,8 @@ module Mencoro
|
|
|
171
171
|
|
|
172
172
|
# header parameters
|
|
173
173
|
header_params = opts[:header_params] || {}
|
|
174
|
+
# HTTP header 'Accept' (if needed)
|
|
175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
174
176
|
|
|
175
177
|
# form parameters
|
|
176
178
|
form_params = opts[:form_params] || {}
|
|
@@ -179,7 +181,7 @@ module Mencoro
|
|
|
179
181
|
post_body = opts[:debug_body]
|
|
180
182
|
|
|
181
183
|
# return_type
|
|
182
|
-
return_type = opts[:debug_return_type]
|
|
184
|
+
return_type = opts[:debug_return_type] || 'CitedSourcesResponse'
|
|
183
185
|
|
|
184
186
|
# auth_names
|
|
185
187
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -211,11 +213,11 @@ module Mencoro
|
|
|
211
213
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
212
214
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
213
215
|
# @option opts [Array<String>] :query_cluster_ids Restrict to these clusters. Each must belong to the project.
|
|
214
|
-
# @option opts [Boolean] :include_ungrouped_queries Sent alone, returns only the ungrouped
|
|
215
|
-
# @return [
|
|
216
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, returns only the ungrouped row: the tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds that row to those clusters. Omit both for every cluster plus the ungrouped row. (default to false)
|
|
217
|
+
# @return [ProjectRankTrackingClusterBreakdown]
|
|
216
218
|
def get_cluster_breakdown(organization_id, project_id, date_from, date_to, opts = {})
|
|
217
|
-
get_cluster_breakdown_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
218
|
-
|
|
219
|
+
data, _status_code, _headers = get_cluster_breakdown_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
220
|
+
data
|
|
219
221
|
end
|
|
220
222
|
|
|
221
223
|
# Rank-tracking metrics per keyword cluster
|
|
@@ -228,8 +230,8 @@ module Mencoro
|
|
|
228
230
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
229
231
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
230
232
|
# @option opts [Array<String>] :query_cluster_ids Restrict to these clusters. Each must belong to the project.
|
|
231
|
-
# @option opts [Boolean] :include_ungrouped_queries Sent alone, returns only the ungrouped
|
|
232
|
-
# @return [Array<(
|
|
233
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, returns only the ungrouped row: the tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds that row to those clusters. Omit both for every cluster plus the ungrouped row. (default to false)
|
|
234
|
+
# @return [Array<(ProjectRankTrackingClusterBreakdown, Integer, Hash)>] ProjectRankTrackingClusterBreakdown data, response status code and response headers
|
|
233
235
|
def get_cluster_breakdown_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
234
236
|
if @api_client.config.debugging
|
|
235
237
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_cluster_breakdown ...'
|
|
@@ -250,7 +252,7 @@ module Mencoro
|
|
|
250
252
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
251
253
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_cluster_breakdown"
|
|
252
254
|
end
|
|
253
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
255
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
254
256
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
255
257
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
256
258
|
end
|
|
@@ -268,6 +270,8 @@ module Mencoro
|
|
|
268
270
|
|
|
269
271
|
# header parameters
|
|
270
272
|
header_params = opts[:header_params] || {}
|
|
273
|
+
# HTTP header 'Accept' (if needed)
|
|
274
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
271
275
|
|
|
272
276
|
# form parameters
|
|
273
277
|
form_params = opts[:form_params] || {}
|
|
@@ -276,7 +280,7 @@ module Mencoro
|
|
|
276
280
|
post_body = opts[:debug_body]
|
|
277
281
|
|
|
278
282
|
# return_type
|
|
279
|
-
return_type = opts[:debug_return_type]
|
|
283
|
+
return_type = opts[:debug_return_type] || 'ProjectRankTrackingClusterBreakdown'
|
|
280
284
|
|
|
281
285
|
# auth_names
|
|
282
286
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -308,10 +312,10 @@ module Mencoro
|
|
|
308
312
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated. SERP and Shopping carry no AI answer text, so they contribute no co-occurrence.
|
|
309
313
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
310
314
|
# @option opts [String] :competitor_id Restricts the answer to a single tracked competitor. Omit it for every tracked competitor. The available-filters endpoint lists the valid ids.
|
|
311
|
-
# @return [
|
|
315
|
+
# @return [CompetitorCoOccurrenceResponse]
|
|
312
316
|
def get_competitor_co_occurrence(organization_id, project_id, date_from, date_to, opts = {})
|
|
313
|
-
get_competitor_co_occurrence_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
314
|
-
|
|
317
|
+
data, _status_code, _headers = get_competitor_co_occurrence_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
318
|
+
data
|
|
315
319
|
end
|
|
316
320
|
|
|
317
321
|
# Head-to-head record of the brand against each tracked competitor
|
|
@@ -324,7 +328,7 @@ module Mencoro
|
|
|
324
328
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated. SERP and Shopping carry no AI answer text, so they contribute no co-occurrence.
|
|
325
329
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
326
330
|
# @option opts [String] :competitor_id Restricts the answer to a single tracked competitor. Omit it for every tracked competitor. The available-filters endpoint lists the valid ids.
|
|
327
|
-
# @return [Array<(
|
|
331
|
+
# @return [Array<(CompetitorCoOccurrenceResponse, Integer, Hash)>] CompetitorCoOccurrenceResponse data, response status code and response headers
|
|
328
332
|
def get_competitor_co_occurrence_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
329
333
|
if @api_client.config.debugging
|
|
330
334
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_competitor_co_occurrence ...'
|
|
@@ -345,7 +349,7 @@ module Mencoro
|
|
|
345
349
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
346
350
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_competitor_co_occurrence"
|
|
347
351
|
end
|
|
348
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
352
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
349
353
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
350
354
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
351
355
|
end
|
|
@@ -362,6 +366,8 @@ module Mencoro
|
|
|
362
366
|
|
|
363
367
|
# header parameters
|
|
364
368
|
header_params = opts[:header_params] || {}
|
|
369
|
+
# HTTP header 'Accept' (if needed)
|
|
370
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
365
371
|
|
|
366
372
|
# form parameters
|
|
367
373
|
form_params = opts[:form_params] || {}
|
|
@@ -370,7 +376,7 @@ module Mencoro
|
|
|
370
376
|
post_body = opts[:debug_body]
|
|
371
377
|
|
|
372
378
|
# return_type
|
|
373
|
-
return_type = opts[:debug_return_type]
|
|
379
|
+
return_type = opts[:debug_return_type] || 'CompetitorCoOccurrenceResponse'
|
|
374
380
|
|
|
375
381
|
# auth_names
|
|
376
382
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -393,7 +399,7 @@ module Mencoro
|
|
|
393
399
|
end
|
|
394
400
|
|
|
395
401
|
# Composition of a project brand mentions in AI answers
|
|
396
|
-
# Minimum role: viewer. Counts of the project brand's own text mentions in AI answers over a date window, grouped three ways: byType (recommendation, comparison, listing, example, reference), byTone (positive, neutral, negative) and byQualifier (direct, conditional — a conditional mention is one the answer hedged with a condition).
|
|
402
|
+
# Minimum role: viewer. Counts of the project brand's own text mentions in AI answers over a date window, grouped three ways: byType (recommendation, comparison, listing, example, reference), byTone (positive, neutral, negative) and byQualifier (direct, conditional — a conditional mention is one the answer hedged with a condition). Every bucket is always present and is a plain count, never null: a zero means no mention of that kind was found in the window. The three groupings count the same mentions, so each one sums to the same total. Only the project brand is counted: tracked competitors, untracked competitors and unrelated brands are all excluded (mentions stored before the relation was recorded count as the brand, as they do in Share of Voice). Only mentions inside the answer text are counted — a citation of the brand's URL is not a mention here. Each count is a raw number of stored mentions: when a query runs several passes a day, every pass adds its own. The counts therefore show the composition of the brand's mentions but are not the inputs of the Share of Voice score, which averages each check over its passes and also weights cited links. Only AI answer engines produce mentions, so restricting engines to google_serp or google_shopping alone returns all zeros. For the positive/neutral/negative split per engine and per competitor use the sentiment endpoint.
|
|
397
403
|
# @param organization_id [String]
|
|
398
404
|
# @param project_id [String]
|
|
399
405
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -401,14 +407,14 @@ module Mencoro
|
|
|
401
407
|
# @param [Hash] opts the optional parameters
|
|
402
408
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated. Non-AI engines contribute no mentions.
|
|
403
409
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
404
|
-
# @return [
|
|
410
|
+
# @return [ProjectMentionMixResponse]
|
|
405
411
|
def get_mention_mix(organization_id, project_id, date_from, date_to, opts = {})
|
|
406
|
-
get_mention_mix_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
407
|
-
|
|
412
|
+
data, _status_code, _headers = get_mention_mix_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
413
|
+
data
|
|
408
414
|
end
|
|
409
415
|
|
|
410
416
|
# Composition of a project brand mentions in AI answers
|
|
411
|
-
# Minimum role: viewer. Counts of the project brand's own text mentions in AI answers over a date window, grouped three ways: byType (recommendation, comparison, listing, example, reference), byTone (positive, neutral, negative) and byQualifier (direct, conditional — a conditional mention is one the answer hedged with a condition).
|
|
417
|
+
# Minimum role: viewer. Counts of the project brand's own text mentions in AI answers over a date window, grouped three ways: byType (recommendation, comparison, listing, example, reference), byTone (positive, neutral, negative) and byQualifier (direct, conditional — a conditional mention is one the answer hedged with a condition). Every bucket is always present and is a plain count, never null: a zero means no mention of that kind was found in the window. The three groupings count the same mentions, so each one sums to the same total. Only the project brand is counted: tracked competitors, untracked competitors and unrelated brands are all excluded (mentions stored before the relation was recorded count as the brand, as they do in Share of Voice). Only mentions inside the answer text are counted — a citation of the brand's URL is not a mention here. Each count is a raw number of stored mentions: when a query runs several passes a day, every pass adds its own. The counts therefore show the composition of the brand's mentions but are not the inputs of the Share of Voice score, which averages each check over its passes and also weights cited links. Only AI answer engines produce mentions, so restricting engines to google_serp or google_shopping alone returns all zeros. For the positive/neutral/negative split per engine and per competitor use the sentiment endpoint.
|
|
412
418
|
# @param organization_id [String]
|
|
413
419
|
# @param project_id [String]
|
|
414
420
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -416,7 +422,7 @@ module Mencoro
|
|
|
416
422
|
# @param [Hash] opts the optional parameters
|
|
417
423
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated. Non-AI engines contribute no mentions.
|
|
418
424
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
419
|
-
# @return [Array<(
|
|
425
|
+
# @return [Array<(ProjectMentionMixResponse, Integer, Hash)>] ProjectMentionMixResponse data, response status code and response headers
|
|
420
426
|
def get_mention_mix_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
421
427
|
if @api_client.config.debugging
|
|
422
428
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_mention_mix ...'
|
|
@@ -437,7 +443,7 @@ module Mencoro
|
|
|
437
443
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
438
444
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_mention_mix"
|
|
439
445
|
end
|
|
440
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
446
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
441
447
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
442
448
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
443
449
|
end
|
|
@@ -453,6 +459,8 @@ module Mencoro
|
|
|
453
459
|
|
|
454
460
|
# header parameters
|
|
455
461
|
header_params = opts[:header_params] || {}
|
|
462
|
+
# HTTP header 'Accept' (if needed)
|
|
463
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
456
464
|
|
|
457
465
|
# form parameters
|
|
458
466
|
form_params = opts[:form_params] || {}
|
|
@@ -461,7 +469,7 @@ module Mencoro
|
|
|
461
469
|
post_body = opts[:debug_body]
|
|
462
470
|
|
|
463
471
|
# return_type
|
|
464
|
-
return_type = opts[:debug_return_type]
|
|
472
|
+
return_type = opts[:debug_return_type] || 'ProjectMentionMixResponse'
|
|
465
473
|
|
|
466
474
|
# auth_names
|
|
467
475
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -484,7 +492,7 @@ module Mencoro
|
|
|
484
492
|
end
|
|
485
493
|
|
|
486
494
|
# Sample of the raw AI mention texts of a project
|
|
487
|
-
# Minimum role: viewer. A paginated page of the individual mention texts behind the aggregate numbers, for qualitative review and for checking sentiment labels by eye. Each sample carries the mention text, the engine and country it was seen in, the tracked query that produced it, its sentiment and mention type, and mentionPosition — a 1-based rank inside the answer where LOWER is better, always present. `total` counts every mention matching the filters, not the size of the page returned. Only mentions inside the answer text are returned: a citation of the brand URL is not a mention here, and only AI answer engines produce mentions, so restricting engines to google_serp or google_shopping alone returns an empty page rather than an error. Two fields carry a \"not known\" rather than a zero: country is null and queryText is empty when the tracked query behind the mention has since been deleted, and competitorId is null when the mention row stores no competitor id — which is NOT an assertion that the mention is about your own brand, since an untracked competitor also stores none. Read mentionRelation instead: `own` and `tracked-competitor` are what the scraper resolved to a configured entity, `untracked-competitor` is a rival the project does not track, and null means the row predates the field. brandName carries the mentioned brand, and is the only way to name an untracked competitor, which has no competitor id to resolve one from. Omitting the competitorId filter returns exactly the rows with no competitor id stored — that is, own-brand AND untracked-competitor mentions together, not every competitor; pass a competitor UUID to restrict the page to that competitor, and use mentionRelation to separate the rest. For the aggregate positive/neutral/negative split use the sentiment endpoint, and for
|
|
495
|
+
# Minimum role: viewer. A paginated page of the individual mention texts behind the aggregate numbers, for qualitative review and for checking sentiment labels by eye. Each sample carries the mention text, the engine and country it was seen in, the tracked query that produced it, its sentiment and mention type, and mentionPosition — a 1-based rank inside the answer where LOWER is better, always present. `total` counts every mention matching the filters, not the size of the page returned. Only mentions inside the answer text are returned: a citation of the brand URL is not a mention here, and only AI answer engines produce mentions, so restricting engines to google_serp or google_shopping alone returns an empty page rather than an error. Two fields carry a \"not known\" rather than a zero: country is null and queryText is empty when the tracked query behind the mention has since been deleted, and competitorId is null when the mention row stores no competitor id — which is NOT an assertion that the mention is about your own brand, since an untracked competitor also stores none. Read mentionRelation instead: `own` and `tracked-competitor` are what the scraper resolved to a configured entity, `untracked-competitor` is a rival the project does not track, and null means the row predates the field. brandName carries the mentioned brand, and is the only way to name an untracked competitor, which has no competitor id to resolve one from. Omitting the competitorId filter returns exactly the rows with no competitor id stored — that is, own-brand AND untracked-competitor mentions together, not every competitor; pass a competitor UUID to restrict the page to that competitor, and use mentionRelation to separate the rest. For the aggregate positive/neutral/negative split use the sentiment endpoint, and for the brand's own mention counts by type, tone and qualifier the mention mix endpoint.
|
|
488
496
|
# @param organization_id [String]
|
|
489
497
|
# @param project_id [String]
|
|
490
498
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -498,14 +506,14 @@ module Mencoro
|
|
|
498
506
|
# @option opts [String] :sort_by recent: newest first. negative: negative sentiment first, then neutral, then positive, newest first inside each. engine and country: grouped alphabetically, newest first inside each group. An unknown value is rejected, not replaced by the default. (default to 'recent')
|
|
499
507
|
# @option opts [Integer] :limit Page size. A larger value is rejected, never silently reduced. (default to 20)
|
|
500
508
|
# @option opts [Integer] :offset Number of matching mentions to skip before the page starts. (default to 0)
|
|
501
|
-
# @return [
|
|
509
|
+
# @return [ProjectMentionSamplesResponse]
|
|
502
510
|
def get_mention_samples(organization_id, project_id, date_from, date_to, opts = {})
|
|
503
|
-
get_mention_samples_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
504
|
-
|
|
511
|
+
data, _status_code, _headers = get_mention_samples_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
512
|
+
data
|
|
505
513
|
end
|
|
506
514
|
|
|
507
515
|
# Sample of the raw AI mention texts of a project
|
|
508
|
-
# Minimum role: viewer. A paginated page of the individual mention texts behind the aggregate numbers, for qualitative review and for checking sentiment labels by eye. Each sample carries the mention text, the engine and country it was seen in, the tracked query that produced it, its sentiment and mention type, and mentionPosition — a 1-based rank inside the answer where LOWER is better, always present. `total` counts every mention matching the filters, not the size of the page returned. Only mentions inside the answer text are returned: a citation of the brand URL is not a mention here, and only AI answer engines produce mentions, so restricting engines to google_serp or google_shopping alone returns an empty page rather than an error. Two fields carry a \"not known\" rather than a zero: country is null and queryText is empty when the tracked query behind the mention has since been deleted, and competitorId is null when the mention row stores no competitor id — which is NOT an assertion that the mention is about your own brand, since an untracked competitor also stores none. Read mentionRelation instead: `own` and `tracked-competitor` are what the scraper resolved to a configured entity, `untracked-competitor` is a rival the project does not track, and null means the row predates the field. brandName carries the mentioned brand, and is the only way to name an untracked competitor, which has no competitor id to resolve one from. Omitting the competitorId filter returns exactly the rows with no competitor id stored — that is, own-brand AND untracked-competitor mentions together, not every competitor; pass a competitor UUID to restrict the page to that competitor, and use mentionRelation to separate the rest. For the aggregate positive/neutral/negative split use the sentiment endpoint, and for
|
|
516
|
+
# Minimum role: viewer. A paginated page of the individual mention texts behind the aggregate numbers, for qualitative review and for checking sentiment labels by eye. Each sample carries the mention text, the engine and country it was seen in, the tracked query that produced it, its sentiment and mention type, and mentionPosition — a 1-based rank inside the answer where LOWER is better, always present. `total` counts every mention matching the filters, not the size of the page returned. Only mentions inside the answer text are returned: a citation of the brand URL is not a mention here, and only AI answer engines produce mentions, so restricting engines to google_serp or google_shopping alone returns an empty page rather than an error. Two fields carry a \"not known\" rather than a zero: country is null and queryText is empty when the tracked query behind the mention has since been deleted, and competitorId is null when the mention row stores no competitor id — which is NOT an assertion that the mention is about your own brand, since an untracked competitor also stores none. Read mentionRelation instead: `own` and `tracked-competitor` are what the scraper resolved to a configured entity, `untracked-competitor` is a rival the project does not track, and null means the row predates the field. brandName carries the mentioned brand, and is the only way to name an untracked competitor, which has no competitor id to resolve one from. Omitting the competitorId filter returns exactly the rows with no competitor id stored — that is, own-brand AND untracked-competitor mentions together, not every competitor; pass a competitor UUID to restrict the page to that competitor, and use mentionRelation to separate the rest. For the aggregate positive/neutral/negative split use the sentiment endpoint, and for the brand's own mention counts by type, tone and qualifier the mention mix endpoint.
|
|
509
517
|
# @param organization_id [String]
|
|
510
518
|
# @param project_id [String]
|
|
511
519
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -519,7 +527,7 @@ module Mencoro
|
|
|
519
527
|
# @option opts [String] :sort_by recent: newest first. negative: negative sentiment first, then neutral, then positive, newest first inside each. engine and country: grouped alphabetically, newest first inside each group. An unknown value is rejected, not replaced by the default. (default to 'recent')
|
|
520
528
|
# @option opts [Integer] :limit Page size. A larger value is rejected, never silently reduced. (default to 20)
|
|
521
529
|
# @option opts [Integer] :offset Number of matching mentions to skip before the page starts. (default to 0)
|
|
522
|
-
# @return [Array<(
|
|
530
|
+
# @return [Array<(ProjectMentionSamplesResponse, Integer, Hash)>] ProjectMentionSamplesResponse data, response status code and response headers
|
|
523
531
|
def get_mention_samples_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
524
532
|
if @api_client.config.debugging
|
|
525
533
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_mention_samples ...'
|
|
@@ -540,7 +548,7 @@ module Mencoro
|
|
|
540
548
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
541
549
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_mention_samples"
|
|
542
550
|
end
|
|
543
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
551
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
544
552
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
545
553
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
546
554
|
end
|
|
@@ -596,7 +604,7 @@ module Mencoro
|
|
|
596
604
|
post_body = opts[:debug_body]
|
|
597
605
|
|
|
598
606
|
# return_type
|
|
599
|
-
return_type = opts[:debug_return_type]
|
|
607
|
+
return_type = opts[:debug_return_type] || 'ProjectMentionSamplesResponse'
|
|
600
608
|
|
|
601
609
|
# auth_names
|
|
602
610
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -676,7 +684,7 @@ module Mencoro
|
|
|
676
684
|
end
|
|
677
685
|
|
|
678
686
|
# Snapshot rank-health board across an organization active projects
|
|
679
|
-
# Minimum role: viewer. One row per active project — share of voice, mention rate, average mention position, positivity index and tracked-query count — ordered by share of voice, plus an organization-level aggregate of the same metrics. Archived projects are excluded. This is a current-state snapshot and takes no date window; for a date-ranged comparison call the per-project operations (getProjectMetrics, getProjectTimeSeries) for each projectId returned here. Every metric is nullable, and a null means the project has no rank data yet — not a score of zero. Higher is better for shareOfVoice, mentionRate and positivityIndex; avgMentionPosition is a 1-based rank, so LOWER is better.
|
|
687
|
+
# Minimum role: viewer. One row per active project the caller can access — share of voice, mention rate, average mention position, positivity index and tracked-query count — ordered by share of voice, plus an organization-level aggregate of the same metrics. Archived projects are excluded. For a member restricted to selected projects, the rows and every aggregate figure cover those projects only. This is a current-state snapshot and takes no date window; for a date-ranged comparison call the per-project operations (getProjectMetrics, getProjectTimeSeries) for each projectId returned here. Every metric is nullable, and a null means the project has no rank data yet — not a score of zero. Higher is better for shareOfVoice, mentionRate and positivityIndex; avgMentionPosition is a 1-based rank, so LOWER is better.
|
|
680
688
|
# @param organization_id [String]
|
|
681
689
|
# @param [Hash] opts the optional parameters
|
|
682
690
|
# @return [GetOrganizationOverview200Response]
|
|
@@ -686,7 +694,7 @@ module Mencoro
|
|
|
686
694
|
end
|
|
687
695
|
|
|
688
696
|
# Snapshot rank-health board across an organization active projects
|
|
689
|
-
# Minimum role: viewer. One row per active project — share of voice, mention rate, average mention position, positivity index and tracked-query count — ordered by share of voice, plus an organization-level aggregate of the same metrics. Archived projects are excluded. This is a current-state snapshot and takes no date window; for a date-ranged comparison call the per-project operations (getProjectMetrics, getProjectTimeSeries) for each projectId returned here. Every metric is nullable, and a null means the project has no rank data yet — not a score of zero. Higher is better for shareOfVoice, mentionRate and positivityIndex; avgMentionPosition is a 1-based rank, so LOWER is better.
|
|
697
|
+
# Minimum role: viewer. One row per active project the caller can access — share of voice, mention rate, average mention position, positivity index and tracked-query count — ordered by share of voice, plus an organization-level aggregate of the same metrics. Archived projects are excluded. For a member restricted to selected projects, the rows and every aggregate figure cover those projects only. This is a current-state snapshot and takes no date window; for a date-ranged comparison call the per-project operations (getProjectMetrics, getProjectTimeSeries) for each projectId returned here. Every metric is nullable, and a null means the project has no rank data yet — not a score of zero. Higher is better for shareOfVoice, mentionRate and positivityIndex; avgMentionPosition is a 1-based rank, so LOWER is better.
|
|
690
698
|
# @param organization_id [String]
|
|
691
699
|
# @param [Hash] opts the optional parameters
|
|
692
700
|
# @return [Array<(GetOrganizationOverview200Response, Integer, Hash)>] GetOrganizationOverview200Response data, response status code and response headers
|
|
@@ -739,7 +747,7 @@ module Mencoro
|
|
|
739
747
|
end
|
|
740
748
|
|
|
741
749
|
# Headline visibility metrics of a project
|
|
742
|
-
# Minimum role: viewer. The project overview over a date window: share of voice (own and per competitor), mention / SERP / shopping rates, average
|
|
750
|
+
# Minimum role: viewer. The project overview over a date window: share of voice (own and per competitor), mention / SERP / shopping rates, average positions, position stability, the sentiment split and the position-distribution buckets. Positions are 1-based, so a LOWER number is better; rates, the positivity index and share of voice are percentages from 0 to 100, where HIGHER is better. Every `trend*` field is the signed change against the immediately preceding window of the same length, signed so that POSITIVE always means improved: for a position or a stability spread a positive trend means the number went down, for a rate or score it means the number went up. A null metric means \"not known yet\", never zero: a scalar is null when the window holds no checks at all, and a `trend*` field is null when there is no earlier window to compare against. The counters (`mentionCount`, `*TrackedQueryCount`, `*QueriesWithResult`, `sentiment*` and `mentionTypeCounts`) are genuine zeros instead, so an empty window reads as zero counts with null rates. `dataDirtySince` is non-null while a recalculation is pending, meaning the figures may still move for dates from then on.
|
|
743
751
|
# @param organization_id [String]
|
|
744
752
|
# @param project_id [String]
|
|
745
753
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -748,15 +756,15 @@ module Mencoro
|
|
|
748
756
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
749
757
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
750
758
|
# @option opts [Array<String>] :query_cluster_ids Restrict to these keyword clusters. Each must belong to this project.
|
|
751
|
-
# @option opts [Boolean] :include_ungrouped_queries
|
|
752
|
-
# @return [
|
|
759
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all tracked queries. (default to false)
|
|
760
|
+
# @return [ProjectRankTrackingStats]
|
|
753
761
|
def get_project_metrics(organization_id, project_id, date_from, date_to, opts = {})
|
|
754
|
-
get_project_metrics_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
755
|
-
|
|
762
|
+
data, _status_code, _headers = get_project_metrics_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
763
|
+
data
|
|
756
764
|
end
|
|
757
765
|
|
|
758
766
|
# Headline visibility metrics of a project
|
|
759
|
-
# Minimum role: viewer. The project overview over a date window: share of voice (own and per competitor), mention / SERP / shopping rates, average
|
|
767
|
+
# Minimum role: viewer. The project overview over a date window: share of voice (own and per competitor), mention / SERP / shopping rates, average positions, position stability, the sentiment split and the position-distribution buckets. Positions are 1-based, so a LOWER number is better; rates, the positivity index and share of voice are percentages from 0 to 100, where HIGHER is better. Every `trend*` field is the signed change against the immediately preceding window of the same length, signed so that POSITIVE always means improved: for a position or a stability spread a positive trend means the number went down, for a rate or score it means the number went up. A null metric means \"not known yet\", never zero: a scalar is null when the window holds no checks at all, and a `trend*` field is null when there is no earlier window to compare against. The counters (`mentionCount`, `*TrackedQueryCount`, `*QueriesWithResult`, `sentiment*` and `mentionTypeCounts`) are genuine zeros instead, so an empty window reads as zero counts with null rates. `dataDirtySince` is non-null while a recalculation is pending, meaning the figures may still move for dates from then on.
|
|
760
768
|
# @param organization_id [String]
|
|
761
769
|
# @param project_id [String]
|
|
762
770
|
# @param date_from [Date] Inclusive start of the window, Y-m-d. Must fall inside the data retention window.
|
|
@@ -765,8 +773,8 @@ module Mencoro
|
|
|
765
773
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
766
774
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
767
775
|
# @option opts [Array<String>] :query_cluster_ids Restrict to these keyword clusters. Each must belong to this project.
|
|
768
|
-
# @option opts [Boolean] :include_ungrouped_queries
|
|
769
|
-
# @return [Array<(
|
|
776
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all tracked queries. (default to false)
|
|
777
|
+
# @return [Array<(ProjectRankTrackingStats, Integer, Hash)>] ProjectRankTrackingStats data, response status code and response headers
|
|
770
778
|
def get_project_metrics_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
771
779
|
if @api_client.config.debugging
|
|
772
780
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_project_metrics ...'
|
|
@@ -787,7 +795,7 @@ module Mencoro
|
|
|
787
795
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
788
796
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_project_metrics"
|
|
789
797
|
end
|
|
790
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
798
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
791
799
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
792
800
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
793
801
|
end
|
|
@@ -805,6 +813,8 @@ module Mencoro
|
|
|
805
813
|
|
|
806
814
|
# header parameters
|
|
807
815
|
header_params = opts[:header_params] || {}
|
|
816
|
+
# HTTP header 'Accept' (if needed)
|
|
817
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
808
818
|
|
|
809
819
|
# form parameters
|
|
810
820
|
form_params = opts[:form_params] || {}
|
|
@@ -813,7 +823,7 @@ module Mencoro
|
|
|
813
823
|
post_body = opts[:debug_body]
|
|
814
824
|
|
|
815
825
|
# return_type
|
|
816
|
-
return_type = opts[:debug_return_type]
|
|
826
|
+
return_type = opts[:debug_return_type] || 'ProjectRankTrackingStats'
|
|
817
827
|
|
|
818
828
|
# auth_names
|
|
819
829
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -845,11 +855,11 @@ module Mencoro
|
|
|
845
855
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
846
856
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
847
857
|
# @option opts [Array<String>] :query_cluster_ids
|
|
848
|
-
# @option opts [Boolean] :include_ungrouped_queries
|
|
849
|
-
# @return [
|
|
858
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all tracked queries. (default to false)
|
|
859
|
+
# @return [ProjectSentimentBreakdown]
|
|
850
860
|
def get_project_sentiment(organization_id, project_id, date_from, date_to, opts = {})
|
|
851
|
-
get_project_sentiment_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
852
|
-
|
|
861
|
+
data, _status_code, _headers = get_project_sentiment_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
862
|
+
data
|
|
853
863
|
end
|
|
854
864
|
|
|
855
865
|
# Sentiment breakdown of a project brand mentions
|
|
@@ -862,8 +872,8 @@ module Mencoro
|
|
|
862
872
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
863
873
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
864
874
|
# @option opts [Array<String>] :query_cluster_ids
|
|
865
|
-
# @option opts [Boolean] :include_ungrouped_queries
|
|
866
|
-
# @return [Array<(
|
|
875
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all tracked queries. (default to false)
|
|
876
|
+
# @return [Array<(ProjectSentimentBreakdown, Integer, Hash)>] ProjectSentimentBreakdown data, response status code and response headers
|
|
867
877
|
def get_project_sentiment_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
868
878
|
if @api_client.config.debugging
|
|
869
879
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_project_sentiment ...'
|
|
@@ -884,7 +894,7 @@ module Mencoro
|
|
|
884
894
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
885
895
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_project_sentiment"
|
|
886
896
|
end
|
|
887
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
897
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
888
898
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
889
899
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
890
900
|
end
|
|
@@ -902,6 +912,8 @@ module Mencoro
|
|
|
902
912
|
|
|
903
913
|
# header parameters
|
|
904
914
|
header_params = opts[:header_params] || {}
|
|
915
|
+
# HTTP header 'Accept' (if needed)
|
|
916
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
905
917
|
|
|
906
918
|
# form parameters
|
|
907
919
|
form_params = opts[:form_params] || {}
|
|
@@ -910,7 +922,7 @@ module Mencoro
|
|
|
910
922
|
post_body = opts[:debug_body]
|
|
911
923
|
|
|
912
924
|
# return_type
|
|
913
|
-
return_type = opts[:debug_return_type]
|
|
925
|
+
return_type = opts[:debug_return_type] || 'ProjectSentimentBreakdown'
|
|
914
926
|
|
|
915
927
|
# auth_names
|
|
916
928
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -943,12 +955,12 @@ module Mencoro
|
|
|
943
955
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
944
956
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
945
957
|
# @option opts [Array<String>] :query_cluster_ids
|
|
946
|
-
# @option opts [Boolean] :include_ungrouped_queries
|
|
958
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all tracked queries. (default to false)
|
|
947
959
|
# @option opts [Array<String>] :competitor_ids Repeatable, or comma-separated. Each id adds one series under the competitors map of every point.
|
|
948
|
-
# @return [
|
|
960
|
+
# @return [ProjectRankTrackingTimeSeries]
|
|
949
961
|
def get_project_time_series(organization_id, project_id, date_from, date_to, opts = {})
|
|
950
|
-
get_project_time_series_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
951
|
-
|
|
962
|
+
data, _status_code, _headers = get_project_time_series_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
963
|
+
data
|
|
952
964
|
end
|
|
953
965
|
|
|
954
966
|
# Rank-tracking metrics of a project over time
|
|
@@ -962,9 +974,9 @@ module Mencoro
|
|
|
962
974
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated.
|
|
963
975
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
964
976
|
# @option opts [Array<String>] :query_cluster_ids
|
|
965
|
-
# @option opts [Boolean] :include_ungrouped_queries
|
|
977
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to tracked queries that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all tracked queries. (default to false)
|
|
966
978
|
# @option opts [Array<String>] :competitor_ids Repeatable, or comma-separated. Each id adds one series under the competitors map of every point.
|
|
967
|
-
# @return [Array<(
|
|
979
|
+
# @return [Array<(ProjectRankTrackingTimeSeries, Integer, Hash)>] ProjectRankTrackingTimeSeries data, response status code and response headers
|
|
968
980
|
def get_project_time_series_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
969
981
|
if @api_client.config.debugging
|
|
970
982
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_project_time_series ...'
|
|
@@ -989,7 +1001,7 @@ module Mencoro
|
|
|
989
1001
|
if @api_client.config.client_side_validation && opts[:'granularity'] && !allowable_values.include?(opts[:'granularity'])
|
|
990
1002
|
fail ArgumentError, "invalid value for \"granularity\", must be one of #{allowable_values}"
|
|
991
1003
|
end
|
|
992
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1004
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
993
1005
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
994
1006
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
995
1007
|
end
|
|
@@ -1009,6 +1021,8 @@ module Mencoro
|
|
|
1009
1021
|
|
|
1010
1022
|
# header parameters
|
|
1011
1023
|
header_params = opts[:header_params] || {}
|
|
1024
|
+
# HTTP header 'Accept' (if needed)
|
|
1025
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1012
1026
|
|
|
1013
1027
|
# form parameters
|
|
1014
1028
|
form_params = opts[:form_params] || {}
|
|
@@ -1017,7 +1031,7 @@ module Mencoro
|
|
|
1017
1031
|
post_body = opts[:debug_body]
|
|
1018
1032
|
|
|
1019
1033
|
# return_type
|
|
1020
|
-
return_type = opts[:debug_return_type]
|
|
1034
|
+
return_type = opts[:debug_return_type] || 'ProjectRankTrackingTimeSeries'
|
|
1021
1035
|
|
|
1022
1036
|
# auth_names
|
|
1023
1037
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -1052,10 +1066,10 @@ module Mencoro
|
|
|
1052
1066
|
# @option opts [String] :sort_order desc for the top gainers, asc for the top losers. (default to 'desc')
|
|
1053
1067
|
# @option opts [Integer] :limit Page size. A value above the maximum is rejected, never clamped. (default to 20)
|
|
1054
1068
|
# @option opts [Integer] :offset (default to 0)
|
|
1055
|
-
# @return [
|
|
1069
|
+
# @return [TrackedQueryMoversResponse]
|
|
1056
1070
|
def get_query_movers(organization_id, project_id, date_from, date_to, opts = {})
|
|
1057
|
-
get_query_movers_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
1058
|
-
|
|
1071
|
+
data, _status_code, _headers = get_query_movers_with_http_info(organization_id, project_id, date_from, date_to, opts)
|
|
1072
|
+
data
|
|
1059
1073
|
end
|
|
1060
1074
|
|
|
1061
1075
|
# Tracked queries ranked by how much a metric moved
|
|
@@ -1071,7 +1085,7 @@ module Mencoro
|
|
|
1071
1085
|
# @option opts [String] :sort_order desc for the top gainers, asc for the top losers. (default to 'desc')
|
|
1072
1086
|
# @option opts [Integer] :limit Page size. A value above the maximum is rejected, never clamped. (default to 20)
|
|
1073
1087
|
# @option opts [Integer] :offset (default to 0)
|
|
1074
|
-
# @return [Array<(
|
|
1088
|
+
# @return [Array<(TrackedQueryMoversResponse, Integer, Hash)>] TrackedQueryMoversResponse data, response status code and response headers
|
|
1075
1089
|
def get_query_movers_with_http_info(organization_id, project_id, date_from, date_to, opts = {})
|
|
1076
1090
|
if @api_client.config.debugging
|
|
1077
1091
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_query_movers ...'
|
|
@@ -1092,7 +1106,7 @@ module Mencoro
|
|
|
1092
1106
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
1093
1107
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.get_query_movers"
|
|
1094
1108
|
end
|
|
1095
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1109
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1096
1110
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
1097
1111
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
1098
1112
|
end
|
|
@@ -1132,6 +1146,8 @@ module Mencoro
|
|
|
1132
1146
|
|
|
1133
1147
|
# header parameters
|
|
1134
1148
|
header_params = opts[:header_params] || {}
|
|
1149
|
+
# HTTP header 'Accept' (if needed)
|
|
1150
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1135
1151
|
|
|
1136
1152
|
# form parameters
|
|
1137
1153
|
form_params = opts[:form_params] || {}
|
|
@@ -1140,7 +1156,7 @@ module Mencoro
|
|
|
1140
1156
|
post_body = opts[:debug_body]
|
|
1141
1157
|
|
|
1142
1158
|
# return_type
|
|
1143
|
-
return_type = opts[:debug_return_type]
|
|
1159
|
+
return_type = opts[:debug_return_type] || 'TrackedQueryMoversResponse'
|
|
1144
1160
|
|
|
1145
1161
|
# auth_names
|
|
1146
1162
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -1163,7 +1179,7 @@ module Mencoro
|
|
|
1163
1179
|
end
|
|
1164
1180
|
|
|
1165
1181
|
# The constants behind the Share of Voice score
|
|
1166
|
-
# Minimum role: viewer. Static reference data, the same for every project: the weights and multipliers that turn individual brand mentions into a Share of Voice score. Each mention is worth `mentionTypeWeights[type] * sentimentMultipliers[tone] * (conditional ? conditionalMultiplier : directMultiplier)`, and a competitor's Share of Voice is its share of the summed weights of every brand in the window, as a percentage. mentionTypeWeights is keyed by mention type (recommendation, comparison, listing, example, reference) and sentimentMultipliers by tone (positive, neutral, negative); a negative mention is discounted, not discarded, because it still evidences presence. A conditional mention is one the answer hedged with a condition (\"if you need X\"). Use this to explain a score, not to recompute one: the
|
|
1182
|
+
# Minimum role: viewer. Static reference data, the same for every project: the weights and multipliers that turn individual brand mentions into a Share of Voice score. Each mention is worth `mentionTypeWeights[type] * sentimentMultipliers[tone] * (conditional ? conditionalMultiplier : directMultiplier)`, and a competitor's Share of Voice is its share of the summed weights of every brand in the window, as a percentage. mentionTypeWeights is keyed by mention type (recommendation, comparison, listing, example, reference) and sentimentMultipliers by tone (positive, neutral, negative); a negative mention is discounted, not discarded, because it still evidences presence. A conditional mention is one the answer hedged with a condition (\"if you need X\"). Use this to explain a score, not to recompute one: the score averages each check over its passes and also weights cited links, so applying these constants to the raw counts of the mention mix endpoint does not reproduce it. Every value is always present and is never null.
|
|
1167
1183
|
# @param organization_id [String]
|
|
1168
1184
|
# @param project_id [String]
|
|
1169
1185
|
# @param [Hash] opts the optional parameters
|
|
@@ -1174,7 +1190,7 @@ module Mencoro
|
|
|
1174
1190
|
end
|
|
1175
1191
|
|
|
1176
1192
|
# The constants behind the Share of Voice score
|
|
1177
|
-
# Minimum role: viewer. Static reference data, the same for every project: the weights and multipliers that turn individual brand mentions into a Share of Voice score. Each mention is worth `mentionTypeWeights[type] * sentimentMultipliers[tone] * (conditional ? conditionalMultiplier : directMultiplier)`, and a competitor's Share of Voice is its share of the summed weights of every brand in the window, as a percentage. mentionTypeWeights is keyed by mention type (recommendation, comparison, listing, example, reference) and sentimentMultipliers by tone (positive, neutral, negative); a negative mention is discounted, not discarded, because it still evidences presence. A conditional mention is one the answer hedged with a condition (\"if you need X\"). Use this to explain a score, not to recompute one: the
|
|
1193
|
+
# Minimum role: viewer. Static reference data, the same for every project: the weights and multipliers that turn individual brand mentions into a Share of Voice score. Each mention is worth `mentionTypeWeights[type] * sentimentMultipliers[tone] * (conditional ? conditionalMultiplier : directMultiplier)`, and a competitor's Share of Voice is its share of the summed weights of every brand in the window, as a percentage. mentionTypeWeights is keyed by mention type (recommendation, comparison, listing, example, reference) and sentimentMultipliers by tone (positive, neutral, negative); a negative mention is discounted, not discarded, because it still evidences presence. A conditional mention is one the answer hedged with a condition (\"if you need X\"). Use this to explain a score, not to recompute one: the score averages each check over its passes and also weights cited links, so applying these constants to the raw counts of the mention mix endpoint does not reproduce it. Every value is always present and is never null.
|
|
1178
1194
|
# @param organization_id [String]
|
|
1179
1195
|
# @param project_id [String]
|
|
1180
1196
|
# @param [Hash] opts the optional parameters
|
|
@@ -1232,7 +1248,7 @@ module Mencoro
|
|
|
1232
1248
|
end
|
|
1233
1249
|
|
|
1234
1250
|
# Rank-tracking time series of a single tracked query
|
|
1235
|
-
# Minimum role: viewer. One point per bucket over the date window, each carrying the brand metrics and one same-shaped entry per requested competitor. Positions (serp, shopping, mention, link) are 1-based, so a LOWER number is better; positivity, shareOfVoice, mentionRate and serpRate are percentages from 0 to 100, where higher is better. Every metric is nullable, and a null means nothing was captured for that entity in that bucket — it is not a zero
|
|
1251
|
+
# Minimum role: viewer. One point per bucket over the date window, each carrying the brand metrics and one same-shaped entry per requested competitor. Positions (serp, shopping, mention, link) are 1-based, so a LOWER number is better; positivity, shareOfVoice, mentionRate and serpRate are percentages from 0 to 100, where higher is better. Every metric is nullable, and a null means nothing was captured for that entity in that bucket — it is not a zero. A bucket appears only when something was matched for the query in it; when only competitors were, the brand's metrics are all null, so a brand that was not mentioned reads as a null shareOfVoice, not as 0. shareOfVoice is also null, even with the brand mentioned, when no tracked competitor carried any mention weight on any day of the bucket: it is a share against tracked competitors, and a weekly or monthly value averages only the days where it could be computed. The tracked query fixes its own engine and country, so no engine or country filter is accepted. A non-null dataDirtySince is a timestamp warning that tracked queries were deleted from the project and historical buckets may still include their contributions until the nightly refresh rebuilds them.
|
|
1236
1252
|
# @param organization_id [String]
|
|
1237
1253
|
# @param project_id [String]
|
|
1238
1254
|
# @param tracked_query_id [String] Must belong to the project in the path.
|
|
@@ -1241,14 +1257,14 @@ module Mencoro
|
|
|
1241
1257
|
# @param [Hash] opts the optional parameters
|
|
1242
1258
|
# @option opts [String] :granularity Bucket size. Prefer weekly or monthly for long windows. (default to 'daily')
|
|
1243
1259
|
# @option opts [Array<String>] :competitor_ids Competitors to add as extra series, repeatable or comma-separated. Valid ids come from the available-filters endpoint.
|
|
1244
|
-
# @return [
|
|
1260
|
+
# @return [TrackedQueryRankTrackingTimeSeries]
|
|
1245
1261
|
def get_tracked_query_time_series(organization_id, project_id, tracked_query_id, date_from, date_to, opts = {})
|
|
1246
|
-
get_tracked_query_time_series_with_http_info(organization_id, project_id, tracked_query_id, date_from, date_to, opts)
|
|
1247
|
-
|
|
1262
|
+
data, _status_code, _headers = get_tracked_query_time_series_with_http_info(organization_id, project_id, tracked_query_id, date_from, date_to, opts)
|
|
1263
|
+
data
|
|
1248
1264
|
end
|
|
1249
1265
|
|
|
1250
1266
|
# Rank-tracking time series of a single tracked query
|
|
1251
|
-
# Minimum role: viewer. One point per bucket over the date window, each carrying the brand metrics and one same-shaped entry per requested competitor. Positions (serp, shopping, mention, link) are 1-based, so a LOWER number is better; positivity, shareOfVoice, mentionRate and serpRate are percentages from 0 to 100, where higher is better. Every metric is nullable, and a null means nothing was captured for that entity in that bucket — it is not a zero
|
|
1267
|
+
# Minimum role: viewer. One point per bucket over the date window, each carrying the brand metrics and one same-shaped entry per requested competitor. Positions (serp, shopping, mention, link) are 1-based, so a LOWER number is better; positivity, shareOfVoice, mentionRate and serpRate are percentages from 0 to 100, where higher is better. Every metric is nullable, and a null means nothing was captured for that entity in that bucket — it is not a zero. A bucket appears only when something was matched for the query in it; when only competitors were, the brand's metrics are all null, so a brand that was not mentioned reads as a null shareOfVoice, not as 0. shareOfVoice is also null, even with the brand mentioned, when no tracked competitor carried any mention weight on any day of the bucket: it is a share against tracked competitors, and a weekly or monthly value averages only the days where it could be computed. The tracked query fixes its own engine and country, so no engine or country filter is accepted. A non-null dataDirtySince is a timestamp warning that tracked queries were deleted from the project and historical buckets may still include their contributions until the nightly refresh rebuilds them.
|
|
1252
1268
|
# @param organization_id [String]
|
|
1253
1269
|
# @param project_id [String]
|
|
1254
1270
|
# @param tracked_query_id [String] Must belong to the project in the path.
|
|
@@ -1257,7 +1273,7 @@ module Mencoro
|
|
|
1257
1273
|
# @param [Hash] opts the optional parameters
|
|
1258
1274
|
# @option opts [String] :granularity Bucket size. Prefer weekly or monthly for long windows. (default to 'daily')
|
|
1259
1275
|
# @option opts [Array<String>] :competitor_ids Competitors to add as extra series, repeatable or comma-separated. Valid ids come from the available-filters endpoint.
|
|
1260
|
-
# @return [Array<(
|
|
1276
|
+
# @return [Array<(TrackedQueryRankTrackingTimeSeries, Integer, Hash)>] TrackedQueryRankTrackingTimeSeries data, response status code and response headers
|
|
1261
1277
|
def get_tracked_query_time_series_with_http_info(organization_id, project_id, tracked_query_id, date_from, date_to, opts = {})
|
|
1262
1278
|
if @api_client.config.debugging
|
|
1263
1279
|
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_tracked_query_time_series ...'
|
|
@@ -1298,6 +1314,8 @@ module Mencoro
|
|
|
1298
1314
|
|
|
1299
1315
|
# header parameters
|
|
1300
1316
|
header_params = opts[:header_params] || {}
|
|
1317
|
+
# HTTP header 'Accept' (if needed)
|
|
1318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1301
1319
|
|
|
1302
1320
|
# form parameters
|
|
1303
1321
|
form_params = opts[:form_params] || {}
|
|
@@ -1306,7 +1324,7 @@ module Mencoro
|
|
|
1306
1324
|
post_body = opts[:debug_body]
|
|
1307
1325
|
|
|
1308
1326
|
# return_type
|
|
1309
|
-
return_type = opts[:debug_return_type]
|
|
1327
|
+
return_type = opts[:debug_return_type] || 'TrackedQueryRankTrackingTimeSeries'
|
|
1310
1328
|
|
|
1311
1329
|
# auth_names
|
|
1312
1330
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
@@ -1407,7 +1425,7 @@ module Mencoro
|
|
|
1407
1425
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated. Narrows which variants count towards each row.
|
|
1408
1426
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
1409
1427
|
# @option opts [Array<String>] :query_cluster_ids Restrict to keywords with a variant in these clusters. Each must belong to the project.
|
|
1410
|
-
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts
|
|
1428
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to keywords with variants that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all keywords. (default to false)
|
|
1411
1429
|
# @option opts [String] :status Restrict to variants with this status. A keyword whose variants disagree still reports statusSummary \"mixed\".
|
|
1412
1430
|
# @option opts [Array<String>] :check_frequencies Repeatable, or comma-separated.
|
|
1413
1431
|
# @option opts [Array<Integer>] :n_passes Repeatable, or comma-separated. Restrict to variants configured with these pass counts.
|
|
@@ -1432,7 +1450,7 @@ module Mencoro
|
|
|
1432
1450
|
# @option opts [Array<String>] :engines Repeatable, or comma-separated. Narrows which variants count towards each row.
|
|
1433
1451
|
# @option opts [Array<String>] :countries ISO-3166 alpha-2 codes or English names. Must be configured on the project.
|
|
1434
1452
|
# @option opts [Array<String>] :query_cluster_ids Restrict to keywords with a variant in these clusters. Each must belong to the project.
|
|
1435
|
-
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts
|
|
1453
|
+
# @option opts [Boolean] :include_ungrouped_queries Sent alone, restricts to keywords with variants that belong to no cluster (refused if there are none). Sent with queryClusterIds, adds them to those clusters. Omit both for all keywords. (default to false)
|
|
1436
1454
|
# @option opts [String] :status Restrict to variants with this status. A keyword whose variants disagree still reports statusSummary \"mixed\".
|
|
1437
1455
|
# @option opts [Array<String>] :check_frequencies Repeatable, or comma-separated.
|
|
1438
1456
|
# @option opts [Array<Integer>] :n_passes Repeatable, or comma-separated. Restrict to variants configured with these pass counts.
|
|
@@ -1462,7 +1480,7 @@ module Mencoro
|
|
|
1462
1480
|
if @api_client.config.client_side_validation && date_to.nil?
|
|
1463
1481
|
fail ArgumentError, "Missing the required parameter 'date_to' when calling AnalyticsApi.list_keyword_listings"
|
|
1464
1482
|
end
|
|
1465
|
-
allowable_values = ["chatgpt", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1483
|
+
allowable_values = ["chatgpt", "claude", "perplexity", "google_ai_overview", "google_ai_mode", "google_serp", "google_shopping"]
|
|
1466
1484
|
if @api_client.config.client_side_validation && opts[:'engines'] && !opts[:'engines'].all? { |item| allowable_values.include?(item) }
|
|
1467
1485
|
fail ArgumentError, "invalid value for \"engines\", must include one of #{allowable_values}"
|
|
1468
1486
|
end
|