AccuWeather Connect provides your audience with the localized weather forecast they need, and generates advertising revenue with every view. Add our simple JavaScript code to implement AccuWeather Connect seamlessly across properties.
AccuWeather Connect provides users with detailed local content such as AccuWeather's MinuteCast®, alerts, air quality, and lifestyle indices, along with core weather forecasting features.
Connect's optional ad unit can rotate through a sampling of content, alternating with targeted advertisements. This option is available as a rotating carousel of static frames or as a video player.
Get access
Contact AccuWeather directly at sales@accuweather.com to get access to AccuWeather Connect. We will provide a publisher name and an AccuWeather API key.
Install
AccuWeather Connect is delivered through a simple, easy-to-install JavaScript app. In the target page's HTML file, select a place for the app and insert one of the following options:
Vertical layout: 300 x 350 pixels app and optional 300 x 250 pixels ad unit (see the data-slim section below for a 300 x 150 option).
Horizontal layout: 600 x 250 pixels app and optional 300 x 250 pixels ad unit.
Configure
To configure your app, replace the attribute values as indicated in the following sections.
data-partner (required)
The data-partner attribute identifies your partner account. Replace the text PUBLISHERNAME with the publisher name your AccuWeather representative provided. Be sure to keep the formatting as provided. See our examples for more detail.
data-key (required)
The data-key attribute provides access to our weather data. Replace the text AWXAPIKEY with the API key your AccuWeather representative provided. Be sure to keep the formatting as provided. See our examples for more detail.
data-slim (optional, vertical layout only)
For the vertical layout only, the optional data-slim attribute provides a slim format at 300 x 150 pixels. The ad unit is 300 x 450 pixels. Add data-slim="true" to the JavaScript code to use.
data-adtype (optional)
The data-adtype attribute controls the optional ad unit. Replace the text none with one of the following options, or leave as-is for no ad unit.
* When using either one of the optional Connatix ad units with the AccuWeather Connect app:
Add data-connatixplayerid="IDNUMBER" to the JavaScript code and replace the text IDNUMBER with the Connatix ID number provided by your AccuWeather representative. This attribute links your client account to the Connect app. See examples here.
Add the following section to your authorized digital sellers (ads.txt) list file, or create a new file, at the root of every domain that has AccuWeather Connect with Connatix activated:
On a new line, add accuweather.com,AWX_PARTNER_ID,DIRECT to the ads.txt file. Replace the text AWX_PARTNER_ID with the partner ID your AccuWeather representative provided. Be sure to keep the formatting as provided.
Submit all hosting domain URLs to your AccuWeather representative via email.
** When using the optional Sovrn ad unit with the AccuWeather Connect app:
Add data-sovrnclient="CLIENTNAME" to the JavaScript code and replace the text CLIENTNAME with your Sovrn client name. This attribute links your client account to the Connect app. See examples here.
Add the following section to your authorized digital sellers (ads.txt) list file, or create a new file, at the root of every domain that has AccuWeather Connect with Sovrn activated:
On a new line, add accuweather.com,AWX_PARTNER_ID,DIRECT to the ads.txt file. Replace the text AWX_PARTNER_ID with the partner ID your AccuWeather representative provided. Be sure to keep the formatting as provided.
Submit all hosting domain URLs to your AccuWeather representative via email.
data-strategy (optional)
The data-strategy attribute offers a selection of weather data displays called cards. Replace the text standard with one of the following options, or leave as-is for the default setting:
Value
Description
standard (default)
Displays the hourly forecast card with additional cards under certain conditions.
round-robin
Rotates through all available weather data cards.
specific:CARDTYPE
Displays only a specific card. Select from the following options:
Displays the current weather conditions. ONLY available with the slim vertical layout.
Language and time localization (optional)
The Connect app supports the languages listed in the table below. To lock the app to a language, add data-language="LANGUAGE" to the JavaScript code and replace the text LANGUAGE with a language code from the table below. If no language is specified, the app will use the web browser's default language. If that language is not supported, the app will use English. AccuWeather will add support for more languages upon request. Please contact your AccuWeather representative for more information.
Language
Language code
English
en
French
fr
Greek
el
Spanish
es
Lock to a location (optional)
The data-location attribute is an optional feature to lock the Connect app's weather information to a specific location. AccuWeather's location keys provide hyper-local content for the most accurate weather data available. Use AccuWeather's Locations API to find the correct location key. Add data-location="LOCATIONKEY" to the JavaScript code and replace the text LOCATIONKEY with your desired location key.
Code examples
Vertical, app only
This is the most basic Connect app option. Only the app will show up, in a vertical layout, with all other options left as standard.
Horizontal app with Connatix ad unit, hourly forecast card only
This example shows the Connect app with the optional Connatix ad unit in a horizontal layout. The data display card is locked to the hourly forecast.
Vertical app and Connatix Playspace ad unit, locked to a location
This example shows the Connect app with the optional Connatix Playspace ad unit in a vertical layout. The weather data location is locked to location code 335315, the code for State College, Pennsylvania.
Slim vertical app in French with Sovrn ad unit
This example shows the Connect app with the optional Sovrn ad unit in a slim vertical layout. The language is locked to French.
Use AccuWeather data in your ad system
AccuWeather Connect provides an option to use our raw weather data with your existing ad system. Once the Connect app has loaded, data is available as JavaScript objects located at window.accuweather. See the table below to find the specific data you would like to use.