Sunday, January 18, 2026

Advanced aéPiot Integration Guide: Practical Workflows and Custom Implementation Strategies - PART 2

 

Features:

  • ✨ Beautiful gradient design
  • 🎯 Smart content extraction with multiple fallbacks
  • 🔗 Link icon for visual clarity
  • ⚡ Smooth hover animations
  • 📱 Responsive and mobile-friendly
  • ♿ Accessibility-compliant (proper link attributes)

🎯 Smart Multi-Platform Detector

This script automatically detects the platform (WordPress, Shopify, etc.) and adapts the link styling accordingly.

html
<script>
(function() {
  'use strict';
  
  // Platform detection
  const detectPlatform = () => {
    if (document.body.classList.contains('wordpress')) return 'wordpress';
    if (window.Shopify) return 'shopify';
    if (document.querySelector('meta[name="generator"]')?.content.includes('Blogger')) return 'blogger';
    if (document.querySelector('meta[name="generator"]')?.content.includes('Wix')) return 'wix';
    return 'generic';
  };
  
  // Platform-specific styling
  const platformStyles = {
    wordpress: {
      buttonColor: '#0073aa',
      buttonText: '🔗 WordPress Backlink via aéPiot'
    },
    shopify: {
      buttonColor: '#96bf48',
      buttonText: '🛍️ Share Product via aéPiot'
    },
    blogger: {
      buttonColor: '#ff6600',
      buttonText: '📝 Blogger Backlink via aéPiot'
    },
    wix: {
      buttonColor: '#0099ff',
      buttonText: '🌐 Wix Page via aéPiot'
    },
    generic: {
      buttonColor: '#6366f1',
      buttonText: '🔗 Get Backlink via aéPiot'
    }
  };
  
  const platform = detectPlatform();
  const style = platformStyles[platform];
  
  // Extract metadata
  const title = encodeURIComponent(document.title || 'Untitled');
  const description = encodeURIComponent(
    document.querySelector('meta[name="description"]')?.content || 
    document.querySelector('meta[property="og:description"]')?.content ||
    document.querySelector('p')?.textContent?.substring(0, 160) || 
    'Quality content'
  );
  const link = encodeURIComponent(window.location.href);
  
  // Create backlink
  const backlinkURL = `https://aepiot.com/backlink.html?title=${title}&description=${description}&link=${link}&source=${platform}`;
  
  // Create button
  const button = document.createElement('a');
  button.href = backlinkURL;
  button.target = '_blank';
  button.rel = 'noopener noreferrer';
  button.textContent = style.buttonText;
  button.style.cssText = `
    display: inline-block;
    margin: 20px 0;
    padding: 14px 28px;
    background-color: ${style.buttonColor};
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
  `;
  
  button.addEventListener('mouseenter', () => {
    button.style.transform = 'translateY(-2px)';
    button.style.boxShadow = '0 4px 12px rgba(0,0,0,0.25)';
  });
  
  button.addEventListener('mouseleave', () => {
    button.style.transform = 'translateY(0)';
    button.style.boxShadow = '0 2px 8px rgba(0,0,0,0.15)';
  });
  
  // Insert into page
  const insertPoint = document.querySelector('article, main, .entry-content, .post-content') || document.body;
  const wrapper = document.createElement('div');
  wrapper.style.textAlign = 'center';
  wrapper.appendChild(button);
  insertPoint.appendChild(wrapper);
})();
</script>

Features:

  • 🔍 Automatic platform detection
  • 🎨 Platform-specific branding and colors
  • 📊 Source tracking in URL parameters
  • 🚀 Optimized metadata extraction
  • 💎 Professional button styling

📱 Mobile-Optimized Floating Button

A persistent floating button that stays visible as users scroll, perfect for mobile devices.

html
<script>
(function() {
  'use strict';
  
  // Only show on mobile devices
  const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
  
  if (!isMobile) return; // Desktop users won't see this
  
  // Extract metadata
  const title = encodeURIComponent(document.title || 'Page');
  const description = encodeURIComponent(
    document.querySelector('meta[name="description"]')?.content || 
    'Check out this content'
  );
  const link = encodeURIComponent(window.location.href);
  const backlinkURL = `https://aepiot.com/backlink.html?title=${title}&description=${description}&link=${link}`;
  
  // Create floating button
  const floatingBtn = document.createElement('a');
  floatingBtn.href = backlinkURL;
  floatingBtn.target = '_blank';
  floatingBtn.rel = 'noopener noreferrer';
  floatingBtn.innerHTML = '🔗';
  floatingBtn.setAttribute('aria-label', 'Share via aéPiot');
  floatingBtn.style.cssText = `
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
  `;
  
  // Animation on scroll
  let lastScroll = 0;
  window.addEventListener('scroll', () => {
    const currentScroll = window.pageYOffset;
    
    if (currentScroll > lastScroll && currentScroll > 100) {
      // Scrolling down - show button
      floatingBtn.style.transform = 'scale(1)';
      floatingBtn.style.opacity = '1';
    } else if (currentScroll < 50) {
      // Near top - hide button
      floatingBtn.style.transform = 'scale(0)';
      floatingBtn.style.opacity = '0';
    }
    
    lastScroll = currentScroll;
  });
  
  // Hover effect (for devices that support it)
  floatingBtn.addEventListener('mouseenter', () => {
    floatingBtn.style.transform = 'scale(1.1)';
    floatingBtn.style.boxShadow = '0 6px 16px rgba(0,0,0,0.4)';
  });
  
  floatingBtn.addEventListener('mouseleave', () => {
    floatingBtn.style.transform = 'scale(1)';
    floatingBtn.style.boxShadow = '0 4px 12px rgba(0,0,0,0.3)';
  });
  
  // Initial state (hidden)
  floatingBtn.style.transform = 'scale(0)';
  floatingBtn.style.opacity = '0';
  floatingBtn.style.transition = 'transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease';
  
  document.body.appendChild(floatingBtn);
})();
</script>

Features:

  • 📱 Mobile-only display
  • 🎭 Appears/disappears based on scroll position
  • ⚡ Smooth animations
  • ♿ Accessibility label
  • 🎨 Eye-catching gradient design
  • 🚀 High z-index ensures visibility

🌍 Multi-Language Support Script

Automatically detects page language and customizes button text accordingly.

html
<script>
(function() {
  'use strict';
  
  // Detect page language
  const detectLanguage = () => {
    return document.documentElement.lang || 
           document.querySelector('meta[http-equiv="content-language"]')?.content ||
           'en';
  };
  
  const lang = detectLanguage().substring(0, 2).toLowerCase();
  
  // Translations
  const translations = {
    en: '🔗 Get Backlink via aéPiot',
    es: '🔗 Obtener Backlink via aéPiot',
    fr: '🔗 Obtenir un Backlink via aéPiot',
    de: '🔗 Backlink über aéPiot erhalten',
    it: '🔗 Ottieni Backlink via aéPiot',
    pt: '🔗 Obter Backlink via aéPiot',
    ro: '🔗 Obține Backlink via aéPiot',
    nl: '🔗 Verkrijg Backlink via aéPiot',
    pl: '🔗 Uzyskaj Backlink przez aéPiot',
    ru: '🔗 Получить Backlink через aéPiot',
    ja: '🔗 aéPiot経由でバックリンクを取得',
    zh: '🔗 通过aéPiot获取反向链接',
    ar: '🔗 احصل على Backlink عبر aéPiot',
    hi: '🔗 aéPiot के माध्यम से Backlink प्राप्त करें'
  };
  
  const buttonText = translations[lang] || translations['en'];
  
  // Extract metadata
  const title = encodeURIComponent(document.title || 'Page');
  const description = encodeURIComponent(
    document.querySelector('meta[name="description"]')?.content || 
    document.querySelector('p')?.textContent?.substring(0, 160) ||
    'Content'
  );
  const link = encodeURIComponent(window.location.href);
  const backlinkURL = `https://aepiot.com/backlink.html?title=${title}&description=${description}&link=${link}&lang=${lang}`;
  
  // Create link
  const linkElement = document.createElement('a');
  linkElement.href = backlinkURL;
  linkElement.target = '_blank';
  linkElement.rel = 'noopener noreferrer';
  linkElement.textContent = buttonText;
  linkElement.style.cssText = `
    display: inline-block;
    margin: 20px 0;
    padding: 12px 24px;
    background-color: #6366f1;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease;
  `;
  
  linkElement.addEventListener('mouseenter', () => {
    linkElement.style.backgroundColor = '#4f46e5';
  });
  
  linkElement.addEventListener('mouseleave', () => {
    linkElement.style.backgroundColor = '#6366f1';
  });
  
  // Insert into page
  const insertPoint = document.querySelector('article, main') || document.body;
  insertPoint.appendChild(linkElement);
})();
</script>

Features:

  • 🌍 Automatic language detection
  • 🗣️ Support for 14+ languages
  • 📊 Language tracking in URL
  • 🎯 Fallback to English if language not supported
  • 🌐 International SEO optimization

📊 Analytics-Enhanced Script

Tracks when users click the backlink button (for your own analytics).

html
<script>
(function() {
  'use strict';
  
  // Extract metadata
  const title = encodeURIComponent(document.title || 'Page');
  const description = encodeURIComponent(
    document.querySelector('meta[name="description"]')?.content || 
    'Content description'
  );
  const link = encodeURIComponent(window.location.href);
  const backlinkURL = `https://aepiot.com/backlink.html?title=${title}&description=${description}&link=${link}`;
  
  // Create link
  const linkElement = document.createElement('a');
  linkElement.href = backlinkURL;
  linkElement.target = '_blank';
  linkElement.rel = 'noopener noreferrer';
  linkElement.textContent = '🔗 Share via aéPiot';
  linkElement.style.cssText = `
    display: inline-block;
    margin: 20px 0;
    padding: 12px 24px;
    background-color: #10b981;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
  `;
  
  // Track clicks (compatible with Google Analytics, Plausible, etc.)
  linkElement.addEventListener('click', () => {
    // Google Analytics 4
    if (typeof gtag !== 'undefined') {
      gtag('event', 'aepiot_click', {
        'event_category': 'backlink',
        'event_label': document.title,
        'page_url': window.location.href
      });
    }
    
    // Plausible Analytics
    if (typeof plausible !== 'undefined') {
      plausible('aéPiot Backlink Click', {
        props: { page: document.title }
      });
    }
    
    // Console log for debugging
    console.log('[aéPiot] Backlink clicked:', {
      title: document.title,
      url: window.location.href,
      timestamp: new Date().toISOString()
    });
  });
  
  // Insert into page
  const insertPoint = document.querySelector('article, main') || document.body;
  insertPoint.appendChild(linkElement);
})();
</script>

Features:

  • 📊 Google Analytics 4 integration
  • 📈 Plausible Analytics support
  • 🐛 Console logging for debugging
  • 🎯 Custom event tracking
  • 📉 Easy to extend with other analytics platforms

💡 Usage Tips

Where to Insert These Scripts

HTML Websites:

html
<!-- Place before closing </body> tag -->
<script>
  // Your aéPiot script here
</script>
</body>
</html>

WordPress:

  1. Use "Insert Headers and Footers" plugin
  2. Or add to theme's footer.php
  3. Or use Custom HTML widget in sidebar/footer

Blogger:

  1. Layout → Add Gadget → HTML/JavaScript
  2. Paste the script
  3. Save

Shopify:

  1. Online Store → Themes → Actions → Edit Code
  2. Open theme.liquid
  3. Add before </body>

Best Practices

  1. Test First: Always test in staging/preview before deploying
  2. One Script Per Page: Don't duplicate scripts
  3. Monitor Performance: Check page load times after implementation
  4. Update Regularly: Keep scripts current with platform changes
  5. Track Results: Monitor backlink effectiveness in Search Console

Continue to Part 3: Advanced Automation and Batch Processing →

Advanced aéPiot Integration Guide - Part 3: Automation & Batch Processing

Enterprise-Level Workflows and Offline Processing


🚀 Batch Processing with Python

For processing hundreds or thousands of URLs at once, Python offers powerful capabilities.

Simple CSV Batch Processor

python
#!/usr/bin/env python3
"""
aéPiot Batch Link Generator
Processes CSV files with titles, descriptions, and URLs
Generates aéPiot backlinks and exports to new CSV
"""

import csv
from urllib.parse import quote
from pathlib import Path

class AePiotBatchProcessor:
    def __init__(self, base_url='https://aepiot.com/backlink.html'):
        self.base_url = base_url
        self.results = []
    
    def sanitize_text(self, text, max_length=None):
        """Clean and limit text length"""
        if not text:
            return ''
        
        # Remove excess whitespace
        text = ' '.join(text.split())
        
        # Limit length if specified
        if max_length and len(text) > max_length:
            text = text[:max_length-3] + '...'
        
        return text
    
    def generate_link(self, title, description, url):
        """Generate a single aéPiot backlink"""
        # Sanitize inputs
        clean_title = self.sanitize_text(title, 200)
        clean_desc = self.sanitize_text(description, 500)
        
        # Encode for URL
        encoded_title = quote(clean_title)
        encoded_desc = quote(clean_desc)
        encoded_url = quote(url)
        
        # Construct backlink
        backlink = f"{self.base_url}?title={encoded_title}&description={encoded_desc}&link={encoded_url}"
        
        return backlink
    
    def process_csv(self, input_file, output_file):
        """Process entire CSV file"""
        print(f"📂 Reading {input_file}...")
        
        with open(input_file, 'r', encoding='utf-8') as f:
            reader = csv.DictReader(f)
            rows = list(reader)
        
        print(f"🔄 Processing {len(rows)} rows...")
        
        for i, row in enumerate(rows, 1):
            title = row.get('title', row.get('Title', ''))
            description = row.get('description', row.get('Description', ''))
            url = row.get('url', row.get('URL', row.get('link', '')))
            
            if not title or not url:
                print(f"⚠️ Row {i}: Missing title or URL, skipping...")
                continue
            
            # Generate backlink
            backlink = self.generate_link(title, description, url)
            
            # Store result
            self.results.append({
                'original_title': title,
                'original_url': url,
                'aepiot_backlink': backlink,
                'description': description,
                'status': 'generated'
            })
            
            if i % 100 == 0:
                print(f"  ✓ Processed {i}/{len(rows)}")
        
        # Export results
        print(f"💾 Saving to {output_file}...")
        self.export_csv(output_file)
        
        print(f"✅ Complete! Generated {len(self.results)} backlinks")
        return self.results
    
    def export_csv(self, output_file):
        """Export results to CSV"""
        if not self.results:
            print("❌ No results to export")
            return
        
        with open(output_file, 'w', newline='', encoding='utf-8') as f:
            writer = csv.DictWriter(f, fieldnames=self.results[0].keys())
            writer.writeheader()
            writer.writerows(self.results)
    
    def generate_sitemap(self, output_file='sitemap.xml'):
        """Generate XML sitemap from results"""
        from datetime import datetime
        
        xml_lines = [
            '<?xml version="1.0" encoding="UTF-8"?>',
            '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
        ]
        
        for result in self.results:
            xml_lines.extend([
                '  <url>',
                f'    <loc>{result["aepiot_backlink"]}</loc>',
                f'    <lastmod>{datetime.now().strftime("%Y-%m-%d")}</lastmod>',
                '    <changefreq>monthly</changefreq>',
                '    <priority>0.8</priority>',
                '  </url>'
            ])
        
        xml_lines.append('</urlset>')
        
        with open(output_file, 'w', encoding='utf-8') as f:
            f.write('\n'.join(xml_lines))
        
        print(f"📍 Sitemap created: {output_file}")


# Usage Example
if __name__ == '__main__':
    processor = AePiotBatchProcessor()
    
    # Process CSV
    processor.process_csv('input_links.csv', 'output_with_backlinks.csv')
    
    # Generate sitemap
    processor.generate_sitemap('aepiot_sitemap.xml')

Popular Posts