Select a specific Location
In this guide we're going to see how you can select a specific location when creating a new analysis.
If you're not familiar with GraphQL, please have a look at its dedicated section in this documentation.
The AdSecure crawler is able to simulate in a different way a user that is going to interact with the web content you want to analyse. One of the key points of this feature is the selection of a specific location.
In this guide, we're going to configure our analysis in order to be connected through a mobile connection in the United States.
Prerequisites
Before starting this guide, please be sure that you're ready to use our service by following the steps illustrated in the Quickstart section.
Simple case
At AdSecure, a location is a combination of 3 parameters:
- The location's
country
which represent the ISO 3 code of a country. - The connection's
type
you want to use. It could take one of the following values:STANDARD
for a connection issued by a data-center.RESIDENTIAL
for a connection issued by a private computer.MOBILE
for a connection issued by a mobile device.
- The
provider
which represent the connection's provider that is going to be used.
The entire list of
Location
is available and can be retrieved by running the following query:
query { locations(first: 500) { nodes { provider country name type enabled } } }
The next steps are quite similar to the one that we've done previous in the in the First Analysis guide. From this previous example, we just need to fill the input.location
field:
Query
mutation {
createAnalysis(input: {
content: "https://examples.adsecure.com/simple",
location: {
country: USA,
type: RESIDENTIAL,
provider: "OTHER"
}
}) {
id
location {
country
type
provider
}
}
}
Response
{
"data": {
"createAnalysis": {
"id": "YW5hbHlzaXN8YThiYzk0M2ItNTY3ZS00NzA5LWIwOWItMTI1YmMzNGMxMjUwfDIwMTgtMDktMDI=",
"location": {
"country": "USA",
"type": "RESIDENTIAL",
"provider": "OTHER"
}
}
}
}
The AdSecure crawler is going to be connected to a mobile device located in the United States with the AT&T service.