Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Add Adsterra

Solved

Add Adsterra

saad532
New Member
4 0 0

how to add adsterra code?

Accepted Solution (1)

EcomGraduates
Shopify Partner
862 71 126

This is an accepted solution.

Hello there  

 

  1. Log in to your Adsterra account and navigate to the "Ads" section.
  2. Select the ad unit you want to add to your website and click on the "Get Code" button.
  3. Copy the ad code provided by Adsterra.
  4. Log in to your Shopify Admin panel and navigate to the "Online Store" section.
  5. Select "Themes" and then click on the "Actions" button.
  6. Click on "Edit code"
  7. Locate the page or template where you want to add the ad unit and paste the code into the HTML or text editor.
  8. Save the changes and preview the page to make sure the ad is appearing properly.

 

It's important to note that the placement of the ad code can affect its performance. Adsterra recommend placing the ad code in a prominent position where it will be visible to visitors, such as the header, footer, or sidebar of your website. Additionally, it's also recommended to test the ad on different devices and browsers to make sure it's working properly.

Keep in mind that Adsterra has a variety of ad formats, such as Display ads, Push notifications, Interstitials, and Video ads. So, the process of adding the code may be different depending on the ad format you choose to use. The most important thing is to make sure that you follow the instructions provided by Adsterra, as well as your website platform when adding the code.

 

 Like + accept if this helped |
 Theme: EcomifyTheme |
️ Get An Audit: Here



View solution in original post

Replies 3 (3)

OneCommerce
Shopify Partner
253 19 110

Hello @saad532 ,

We are OneExperts from OneCommerce and we here to help you.

 

You can follow these steps to add Adsterra code:

  1. Go to your Shopify theme editor -> Layout -> theme.liquid
  2. Type this code:

<head>
...
<!-- Adsterra Code -->
<script async src="https://www.adsterra.com/delivery/asyncjs.php"></script>
<div id="adsterra_slot_123456"></div>
<script>
var adsterra_conf = {
element_id: 'adsterra_slot_123456',
format_id: '123',
responsive: 'true',
onLoad: function() {
console.log('Adsterra ad has been loaded');
},
onError: function() {
console.log('Adsterra ad has failed to load');
}
};
Adsterra.init(adsterra_conf);
</script>
<!-- End Adsterra Code -->
</head>

It's important to note that you should replace "123456" and "123" with the real information you get from Adsterra platform after you create a campaign.

4. Click Save and preview.

 

-> In case that you want to place the ads on specific pages only. You can use the "page.liquid" template and add the Adsterra code there.

 

Hope this can help with your problem.

 

Regards,

OneExperts by OneCommerce.

 

 

OneCommerce - The Ultimate eCommerce Solution Platform
We offer 12+ solutions to help increase traffic, maximize conversion rates and generate better revenue for more than 500,000 eCommerce merchants worldwide.

Get know us at: Website | Blog | FAQ | Contact us

EcomGraduates
Shopify Partner
862 71 126

This is an accepted solution.

Hello there  

 

  1. Log in to your Adsterra account and navigate to the "Ads" section.
  2. Select the ad unit you want to add to your website and click on the "Get Code" button.
  3. Copy the ad code provided by Adsterra.
  4. Log in to your Shopify Admin panel and navigate to the "Online Store" section.
  5. Select "Themes" and then click on the "Actions" button.
  6. Click on "Edit code"
  7. Locate the page or template where you want to add the ad unit and paste the code into the HTML or text editor.
  8. Save the changes and preview the page to make sure the ad is appearing properly.

 

It's important to note that the placement of the ad code can affect its performance. Adsterra recommend placing the ad code in a prominent position where it will be visible to visitors, such as the header, footer, or sidebar of your website. Additionally, it's also recommended to test the ad on different devices and browsers to make sure it's working properly.

Keep in mind that Adsterra has a variety of ad formats, such as Display ads, Push notifications, Interstitials, and Video ads. So, the process of adding the code may be different depending on the ad format you choose to use. The most important thing is to make sure that you follow the instructions provided by Adsterra, as well as your website platform when adding the code.

 

 Like + accept if this helped |
 Theme: EcomifyTheme |
️ Get An Audit: Here



Arsalan
Tourist
21 0 2

In your opinion. It's a good idea or not? to put adsterra ads on your online store? I mean will it hurt the store's reputation and makes it look shady?