Full example: a store from scratch selling through Espectro Pay
Show, with an example store, everything you need to do to sell through the Espectro checkout (Espectro Pay) and measure every sale: the store, the product, the checkout link, the product cost, each product's pixel, Meta's traffic permissions list, the script in the page head and the ad parameters. The names and numbers are made up: replace them with yours.
On this page
- Who does it
- The example store
- Account, login, store and product: what each one is
- Step by step
- Part A. Receive through PIX (once for the whole account)
- Part B. Create the store
- Part C. Recovery coupon
- Part D. Add the product and get the checkout link
- Part E. Connect Espectro Pay to Espectro
- Part F. Connect Meta and create each product's pixel
- Part G. Allow the domains on each pixel (traffic permissions list)
- Part H. Put the script in the head of each page
- Part I. The Buy button
- Part J. URL parameters in the ads
- Part K. Test everything end to end
- What is the same for everything and what changes
- Common problems and solutions
Who does it
The account owner does Parts A to G. Whoever takes care of the website does Parts H and I. The media buyer does Part J. The test (Part K) is the owner's.
The example store
The business is called Casa Aurora and sells two products, each with its own sales page.
| What | In the example | Where it is |
|---|---|---|
| Business (the account in Espectro) | Casa Aurora | Created from the invitation (Create your account and first sign-in) |
| Account code | casa-aurora | Comes from the business name when the account is created and is already filled in on the script line |
| Owner's login | carla | Whoever created the account |
| Team member's login | bruno | Registered by the owner in Users (Account users) |
| Store in Espectro Pay | Casa Aurora | Espectro Pay > Stores |
| Store website | casaaurora.com.br | The website, outside Espectro |
| Product 1 | Jogo de Toalhas Aurora: R$89.90 (was R$129.90), cost R$32.00 | Espectro Pay > Checkout products |
| Sales page for product 1 | https://casaaurora.com.br/toalhas | The website |
| Checkout link for product 1 | https://pay.espectrosolucoes.com.br/checkout/toalhas-aurora | Generated when you save the product |
| Pixel for product 1 | 111122223333444 | Created by Catalog |
| Product 2 | Roupão Aurora: R$159.90, cost R$58.00 | Espectro Pay > Checkout products |
| Sales page for product 2 | https://casaaurora.com.br/roupao | The website |
| Checkout link for product 2 | https://pay.espectrosolucoes.com.br/checkout/roupao-aurora | Generated when you save the product |
| Pixel for product 2 | 555566667777888 | Created by Catalog |
| Recovery coupon | VOLTA10 (10%) | Espectro Pay > Coupons |
Account, login, store and product: what each one is
- Account is the business. Everything lives inside it: stores, products, sales, team, the Meta connection. It has a code (in the example,
casa-aurora), which is what goes in the script, indata-conta. There is only one code for the whole account: the same in every store, on every page and for everyone on the team. - Login is the person. Carla signs in with
carlaand Bruno withbruno, but both are in the same account and see the same stores. The login does not go in the script. Sometimes the account code and the owner's login have the same name (the accountminhalojawith the loginminhaloja): even so, the script always takes the account code, and it is already filled in. - Store is the brand that sells. One account can have several stores, each with its own logo, colors and emails.
- Product is what the store sells. Each product has its own checkout link and its own pixel.
Step by step
Part A. Receive through PIX (once for the whole account)
The PIX goes straight into your Axxon Pay account. Only the owner does this part.
- In the menu, in Espectro Pay, click Payment.
- Paste Axxon's Public key and Secret key and click Save keys. Then click Test connection.
- In the Axxon fee block, fill in the fee in your contract. In the example: Variable fee (%) 13 and Processing cost per sale (R$) 3.50. Click Save the fee.
Details and messages: Axxon keys and fee.
Part B. Create the store
- In Espectro Pay > Stores, click New store.
- Fill in: Store name
Casa Aurora, the Logo, Store websitehttps://casaaurora.com.br, the Button color, Support emailcontato@casaaurora.com.brand the WhatsApp. - Leave both emails in the Emails to the buyer card on (thank-you and recovery).
- Click Save store.
Each field explained: Set up your store.
Part C. Recovery coupon
This is the discount that goes in the email when the PIX expires or the customer abandons the cart.
- In Espectro Pay > Coupons, create the coupon
VOLTA10, of the Percentage type, with 10, for the Casa Aurora store. - Go back to Stores, click Edit on Casa Aurora and, in Recovery coupon, choose
VOLTA10. Save.
More about coupons: Discount coupons.
Part D. Add the product and get the checkout link
- In Espectro Pay > Checkout products, click New product.
- Product card: Name
Jogo de Toalhas Aurora, Store Casa Aurora, Checkout addresstoalhas-aurora, and Product active (checkout open) on. - Price card: Price (R$) 89.90, Compare-at price, struck through (R$) 129.90 and Product cost (R$) 32.00. The cost is optional and the customer does not see it (see the cost in the profit).
- Photos card: upload the photos. The first one is the checkout cover.
- Shipping card:
PAC - Correios, delivery time7 a 11, amount 0 (free); andSEDEX, delivery time2 a 4, amount 19.90. The first option already comes selected in the checkout. - Optional, Option the customer picks card: Option name
Corand, in Values,Branco,AreiaandAzul marinho, one per line. - Leave the Meta pixel empty for now: Part F fills it in.
- Click Save product. The Checkout link shows at the top:
https://pay.espectrosolucoes.com.br/checkout/toalhas-aurora. Click Copy and keep it. Open shows the checkout the way the customer sees it. - Repeat for Roupão Aurora (address
roupao-aurora, price 159.90, cost 58.00).
Each field explained: Checkout products.
The product cost in the profit
With the cost set, every paid sale already comes with the right profit, without entering anything in Expenses. One sale of the towel set, in the example:
| Line | Amount |
|---|---|
| Sale | R$89.90 |
| Axxon fee (13% + R$3.50) | - R$15.19 |
| Product cost | - R$32.00 |
| Net revenue | R$42.71 |
Ads and the other expenses come out of net revenue, and what is left is the Profit in the Overview. In the Meta Ads table, the profit of each campaign, ad set and ad also already takes out the cost.
- The cost applies to sales paid after you save. Did the supplier's price change? Change the cost: sales already paid keep the old cost.
- The order shows the cost in Payment and tracking (Orders and automatic emails). In the Overview, the Product costs line shows up in Where the money went.
- If you already enter the product cost in Expenses, do not fill it in here, or it counts twice.
Part E. Connect Espectro Pay to Espectro
Without this part, the sales happen, but they do not show up in the numbers.
- In Settings > Integrations (incoming webhooks), open New integration: Source Espectro Pay and Store
Casa Aurora. Click Create integration. - Copy the Webhook URL and the Token of the new integration.
- In Espectro Pay > Stores, click Edit on Casa Aurora. In the Outgoing webhooks card, click Add Espectro destination, paste the full URL and the token and leave all events on.
- Click Send test. You must see "Received (HTTP 200)."
Details and what to do if the test fails: Espectro destination.
Part F. Connect Meta and create each product's pixel
One pixel per product, never one pixel for the whole store. If the towels and the bathrobe use the same pixel, Meta mixes up who buys each one and starts showing the ad to the wrong people.
- In Meta Ads, click Connect with Facebook and choose the ad account (connect the ad account).
- In Content > Catalog, click Connect catalog if the badge shows Not connected.
- Choose the Business portfolio, tick both products and click Set up everything. Espectro creates on Meta one pixel for each product, named after the product, saves the pixel in the product's checkout and creates the product in Products and pixels with the right rule. Details: Catalog.
- Click Refresh the list and write down each product's pixel number (Pixel column). In the example: towels
111122223333444and bathrobe555566667777888. - In Settings > Products and pixels, check that each product has the pixel and the token (pixel and token).
Part G. Allow the domains on each pixel (traffic permissions list)
Meta only accepts the browser pixel on the domains that are on the pixel's list. This is done on Meta, once for each pixel.
- In Meta's Events Manager, open the pixel Jogo de Toalhas Aurora.
- Go to Settings > Traffic permissions and add both domains to the list:
casaaurora.com.br(the sales page; subdomains, likewww, are included);pay.espectrosolucoes.com.br(the Espectro Pay checkout).
- Save and repeat on the pixel Roupão Aurora.
| Pixel | Domains on the list |
|---|---|
111122223333444 (towels) | casaaurora.com.br and pay.espectrosolucoes.com.br |
555566667777888 (bathrobe) | casaaurora.com.br and pay.espectrosolucoes.com.br |
If a domain is missing, the pixel stops firing on that page without showing any error. The purchase Espectro sends from the server (Conversions API) does not go through this list. Meta's screen names change from time to time: if you cannot find it, search Meta's help for "traffic permissions".
Part H. Put the script in the head of each page
- In Settings > Integrations (incoming webhooks), scroll down to the Page script card and click Copy on the first line. For Casa Aurora it looks like this:
<script src="https://app.espectrosolucoes.com.br/espectro.js" data-conta="casa-aurora" data-checkout-hosts="pay.espectrosolucoes.com.br" async></script> - Add
data-pixelwith the pixel of the product on that page. Towels page (casaaurora.com.br/toalhas):<script src="https://app.espectrosolucoes.com.br/espectro.js" data-conta="casa-aurora" data-pixel="111122223333444" data-checkout-hosts="pay.espectrosolucoes.com.br" async></script> - Bathrobe page (
casaaurora.com.br/roupao):<script src="https://app.espectrosolucoes.com.br/espectro.js" data-conta="casa-aurora" data-pixel="555566667777888" data-checkout-hosts="pay.espectrosolucoes.com.br" async></script> - Paste each line inside the
<head>of its own page and publish. The name of this place changes on each platform: "header code", "head", "custom scripts" or "custom HTML". In WordPress, use a plugin for inserting header code. - Only one line per page. If the page already had the code for the same pixel pasted by hand, remove the old one.
You do not need to paste anything on the checkout: Espectro Pay already loads the script with the product's pixel and marks the purchase on the PIX page.
What is fixed and what changes in the line:
| Part of the line | In the example | Does it change? |
|---|---|---|
src | https://app.espectrosolucoes.com.br/espectro.js | Never. |
data-conta | casa-aurora | Fixed for the whole account: the same in every store and on every page. |
data-checkout-hosts | pay.espectrosolucoes.com.br | Fixed: it is the Espectro Pay checkout address. |
data-pixel | 111122223333444 or 555566667777888 | Changes per product: each page takes its own product's pixel. |
What the script does and the other attributes: Install the script.
Part I. The Buy button
- On the towels page, the Buy button points to the product's checkout link:
<a href="https://pay.espectrosolucoes.com.br/checkout/toalhas-aurora">Comprar</a> - The script recognizes Espectro Pay links on its own and adds the UTMs and the click code to them. You do not need to change anything else.
- If the page already chooses the color, it can go in the link:
.../checkout/toalhas-aurora?cor=azul-marinho(option in the link). - On the bathrobe page, the button points to
https://pay.espectrosolucoes.com.br/checkout/roupao-aurora.
Part J. URL parameters in the ads
- In Settings > URL parameters, click Copy. The text is the same for every ad, in every store.
- In Meta's Ads Manager, open the ad. In Website URL, put the product's sales page (
https://casaaurora.com.br/toalhas), not the checkout link: it is on that page that the script records the click. - Scroll down to Tracking and paste the text into URL parameters. Do not paste it into Website URL.
- Click Publish. Do the same on every ad.
What each part of the text does: URL parameters.
Part K. Test everything end to end
- Open
https://casaaurora.com.br/toalhas?utm_source=FB&utm_campaign=teste|123. - Hover over the Buy button. The link must end with the UTMs and an
esp_ck=esp.... - With the Meta Pixel Helper extension, check that the pixel
111122223333444fired. - In Products and pixels, fill in the product's Test code (test), so the test purchase does not count as a real one on Meta.
- Click Buy, generate the PIX and pay. For a cheap test, first create a coupon just for you (Discount coupons), keeping the total at R$6.00 or more, the Axxon minimum.
- Check in Espectro:
- Espectro Pay > Orders: the paid order, with the Espectro destination at HTTP 200 and the cost in Payment and tracking;
- Sales: the sale with the campaign "teste" and Matched by: exact click;
- Events: the purchase Sent;
- Overview: the Product costs line in Where the money went.
- Delete the Test code and the test coupon.
The test sale is a real sale: it counts in the numbers.
What is the same for everything and what changes
| Item | Same for everything | Changes per |
|---|---|---|
| Axxon keys and fee | Yes, once for the account | - |
Account code (data-conta) | Yes, every store and page | - |
Checkout address (pay.espectrosolucoes.com.br) | Yes | - |
| URL parameters in the ads | Yes, every ad | - |
| Espectro Pay integration and Espectro destination | - | Store |
| Checkout link | - | Product |
Pixel (data-pixel) | - | Product |
| Sales page and script line | - | Product |
| Traffic permissions list | - | Pixel: the page's domain and pay.espectrosolucoes.com.br |
| Product cost (optional) | - | Product |
Common problems and solutions
| Problem | Solution |
|---|---|
| Sales do not show up in the Overview or in Sales. | The store is missing the Espectro destination, or it has another store's URL or token (Part E). |
| The sale shows up as "Direct". | The ad is missing the URL parameters (Part J) or the page is missing the script (Part H). |
| The pixel does not fire on the page. | data-pixel is missing from the line, or the page's domain is not on the pixel's traffic permissions list (Part G). |
The Buy link does not get the esp_ck. | The script line is not in the head of the published page, or the button does not point to the Espectro Pay link. |
| The profit is too high. | The Axxon fee (Part A) or the product cost (Part D) is missing, or expenses have not been entered. |
| The profit is too low. | The product cost was set here and also entered in Expenses: keep it in only one of the two. |
| Both products are on the same pixel. | Create one pixel for each product (Part F) and change the data-pixel on one of the pages. |