← Back to Dashboard
1
Welcome
2
Import
3
Local SEO
4
Connect
5
Done

Welcome to CitedSEO πŸ‘‹

Let's get you set up in a few steps. First, we'll check if you have data from another SEO plugin to import.

Scanning for existing SEO data…
{ const s = parseInt( el.dataset.step, 10 ); el.classList.toggle( 'active', s === n ); el.classList.toggle( 'done', s < n ); } ); currentStep = n; } function ajax( action, data, cb ) { const fd = new FormData(); fd.append( 'action', action ); fd.append( 'nonce', nonce ); for ( const k in data ) fd.append( k, data[k] ); fetch( ajaxUrl, { method: 'POST', body: fd } ) .then( r => r.json() ) .then( cb ) .catch( () => cb( { success: false, data: 'Network error.' } ) ); } // ── Step 1: Detect ─────────────────────────────────────────────────── const detectTimeout = setTimeout( function() { document.getElementById( 'awb-wiz-detect-loading' ).textContent = 'Scan timed out - you can continue without importing.'; document.getElementById( 'awb-wiz-detect-result' ).style.display = ''; document.getElementById( 'awb-wiz-no-sources' ).style.display = ''; document.getElementById( 'awb-wiz-step1-next' ).disabled = false; }, 8000 ); ajax( 'awbseo_wizard_detect', {}, res => { clearTimeout( detectTimeout ); document.getElementById( 'awb-wiz-detect-loading' ).style.display = 'none'; document.getElementById( 'awb-wiz-detect-result' ).style.display = ''; detectedSources = res.success ? res.data : {}; const wrap = document.getElementById( 'awb-wiz-sources' ); if ( !res.success || !Object.keys( detectedSources ).length ) { document.getElementById( 'awb-wiz-no-sources' ).style.display = ''; } else { for ( const [key, src] of Object.entries( detectedSources ) ) { const div = document.createElement( 'div' ); div.className = 'awb-wiz__source' + ( src.count === 0 ? ' no-data' : '' ); div.innerHTML = ` 0 ? 'checked' : ''} /> ${src.count} posts `; wrap.appendChild( div ); } } document.getElementById( 'awb-wiz-step1-next' ).disabled = false; } ); document.getElementById( 'awb-wiz-step1-next' ).addEventListener( 'click', () => { selectedSources = []; document.querySelectorAll( '#awb-wiz-sources input[type="checkbox"]:checked' ).forEach( el => { selectedSources.push( el.value ); } ); if ( selectedSources.length === 0 ) { showStep( 3 ); // skip import step return; } // Populate import step const wrap = document.getElementById( 'awb-wiz-import-sources' ); wrap.innerHTML = ''; selectedSources.forEach( key => { const src = detectedSources[key]; const div = document.createElement( 'div' ); div.className = 'awb-wiz__source'; div.id = 'awb-import-row-' + key; div.innerHTML = ` ${src.label} ${src.count} posts `; wrap.appendChild( div ); } ); showStep( 2 ); } ); // ── Step 2: Import ─────────────────────────────────────────────────── function runImport( sources, sourceIndex, offset ) { if ( sourceIndex >= sources.length ) { // All done document.getElementById( 'awb-wiz-progress-label' ).textContent = 'Import complete βœ“'; document.getElementById( 'awb-wiz-progress-fill' ).style.width = '100%'; setTimeout( () => showStep( 3 ), 800 ); return; } const source = sources[ sourceIndex ]; ajax( 'awbseo_wizard_import', { source, offset }, res => { if ( !res.success ) { const err = document.getElementById( 'awb-wiz-import-error' ); err.textContent = res.data || 'Import error.'; err.style.display = ''; document.getElementById( 'awb-wiz-import-btn' ).disabled = false; return; } const d = res.data; const label = detectedSources[source]?.label || source; document.getElementById( 'awb-wiz-progress-label' ).textContent = `${label}: ${d.offset} / ${d.total} posts imported…`; document.getElementById( 'awb-wiz-progress-fill' ).style.width = d.pct + '%'; if ( d.done ) { runImport( sources, sourceIndex + 1, 0 ); } else { runImport( sources, sourceIndex, d.offset ); } } ); } document.getElementById( 'awb-wiz-import-btn' ).addEventListener( 'click', function () { this.disabled = true; document.getElementById( 'awb-wiz-import-error' ).style.display = 'none'; document.getElementById( 'awb-wiz-progress-wrap' ).style.display = ''; runImport( selectedSources, 0, 0 ); } ); document.getElementById( 'awb-wiz-import-skip' ).addEventListener( 'click', () => showStep( 3 ) ); // ── Step 3: Local SEO ──────────────────────────────────────────────── function saveLocal( onSuccess ) { const name = document.getElementById( 'awb-wiz-loc-name' ).value.trim(); const errEl = document.getElementById( 'awb-wiz-local-error' ); errEl.style.display = 'none'; if ( !name ) { errEl.textContent = 'Please enter your business name.'; errEl.style.display = ''; return; } ajax( 'awbseo_wizard_save_local', { name: name, street: document.getElementById( 'awb-wiz-loc-street' ).value, city: document.getElementById( 'awb-wiz-loc-city' ).value, region: document.getElementById( 'awb-wiz-loc-region' ).value, postal_code: document.getElementById( 'awb-wiz-loc-postal' ).value, country: document.getElementById( 'awb-wiz-loc-country' ).value, phone: document.getElementById( 'awb-wiz-loc-phone' ).value, email: document.getElementById( 'awb-wiz-loc-email' ).value, }, res => { if ( !res.success ) { errEl.textContent = res.data || 'Could not save location.'; errEl.style.display = ''; return; } onSuccess(); } ); } document.getElementById( 'awb-wiz-local-next' ).addEventListener( 'click', () => { saveLocal( () => showStep( 4 ) ); } ); document.getElementById( 'awb-wiz-local-skip' ).addEventListener( 'click', () => showStep( 4 ) ); // ── Country select - populated via JS so it always works regardless of cached PHP ── (function(){ var sel = document.getElementById( 'awb-wiz-loc-country' ); if ( !sel ) return; var priority = [ ['LB','Lebanon'],['SA','Saudi Arabia'],['AE','UAE'],['KW','Kuwait'], ['QA','Qatar'],['BH','Bahrain'],['OM','Oman'],['JO','Jordan'], ['EG','Egypt'],['SY','Syria'],['IQ','Iraq'],['PS','Palestine'] ]; var all = [ ['AF','Afghanistan'],['AL','Albania'],['DZ','Algeria'],['AD','Andorra'], ['AO','Angola'],['AG','Antigua and Barbuda'],['AR','Argentina'], ['AM','Armenia'],['AU','Australia'],['AT','Austria'],['AZ','Azerbaijan'], ['BS','Bahamas'],['BH','Bahrain'],['BD','Bangladesh'],['BB','Barbados'], ['BY','Belarus'],['BE','Belgium'],['BZ','Belize'],['BJ','Benin'], ['BT','Bhutan'],['BO','Bolivia'],['BA','Bosnia and Herzegovina'], ['BW','Botswana'],['BR','Brazil'],['BN','Brunei'],['BG','Bulgaria'], ['BF','Burkina Faso'],['BI','Burundi'],['CV','Cabo Verde'], ['KH','Cambodia'],['CM','Cameroon'],['CA','Canada'], ['CF','Central African Republic'],['TD','Chad'],['CL','Chile'], ['CN','China'],['CO','Colombia'],['KM','Comoros'],['CG','Congo'], ['CD','Congo (DRC)'],['CR','Costa Rica'],['CI',"CΓ΄te d'Ivoire"], ['HR','Croatia'],['CU','Cuba'],['CY','Cyprus'],['CZ','Czech Republic'], ['DK','Denmark'],['DJ','Djibouti'],['DM','Dominica'], ['DO','Dominican Republic'],['EC','Ecuador'],['EG','Egypt'], ['SV','El Salvador'],['GQ','Equatorial Guinea'],['ER','Eritrea'], ['EE','Estonia'],['SZ','Eswatini'],['ET','Ethiopia'],['FJ','Fiji'], ['FI','Finland'],['FR','France'],['GA','Gabon'],['GM','Gambia'], ['GE','Georgia'],['DE','Germany'],['GH','Ghana'],['GR','Greece'], ['GD','Grenada'],['GT','Guatemala'],['GN','Guinea'], ['GW','Guinea-Bissau'],['GY','Guyana'],['HT','Haiti'], ['HN','Honduras'],['HU','Hungary'],['IS','Iceland'],['IN','India'], ['ID','Indonesia'],['IR','Iran'],['IQ','Iraq'],['IE','Ireland'], ['IL','Israel'],['IT','Italy'],['JM','Jamaica'],['JP','Japan'], ['JO','Jordan'],['KZ','Kazakhstan'],['KE','Kenya'],['KI','Kiribati'], ['KP','North Korea'],['KR','South Korea'],['KW','Kuwait'], ['KG','Kyrgyzstan'],['LA','Laos'],['LV','Latvia'],['LB','Lebanon'], ['LS','Lesotho'],['LR','Liberia'],['LY','Libya'], ['LI','Liechtenstein'],['LT','Lithuania'],['LU','Luxembourg'], ['MG','Madagascar'],['MW','Malawi'],['MY','Malaysia'], ['MV','Maldives'],['ML','Mali'],['MT','Malta'],['MH','Marshall Islands'], ['MR','Mauritania'],['MU','Mauritius'],['MX','Mexico'], ['FM','Micronesia'],['MD','Moldova'],['MC','Monaco'],['MN','Mongolia'], ['ME','Montenegro'],['MA','Morocco'],['MZ','Mozambique'], ['MM','Myanmar'],['NA','Namibia'],['NR','Nauru'],['NP','Nepal'], ['NL','Netherlands'],['NZ','New Zealand'],['NI','Nicaragua'], ['NE','Niger'],['NG','Nigeria'],['MK','North Macedonia'], ['NO','Norway'],['OM','Oman'],['PK','Pakistan'],['PW','Palau'], ['PS','Palestine'],['PA','Panama'],['PG','Papua New Guinea'], ['PY','Paraguay'],['PE','Peru'],['PH','Philippines'],['PL','Poland'], ['PT','Portugal'],['QA','Qatar'],['RO','Romania'],['RU','Russia'], ['RW','Rwanda'],['KN','Saint Kitts and Nevis'],['LC','Saint Lucia'], ['VC','Saint Vincent and the Grenadines'],['WS','Samoa'], ['SM','San Marino'],['ST','Sao Tome and Principe'],['SA','Saudi Arabia'], ['SN','Senegal'],['RS','Serbia'],['SC','Seychelles'], ['SL','Sierra Leone'],['SG','Singapore'],['SK','Slovakia'], ['SI','Slovenia'],['SB','Solomon Islands'],['SO','Somalia'], ['ZA','South Africa'],['SS','South Sudan'],['ES','Spain'], ['LK','Sri Lanka'],['SD','Sudan'],['SR','Suriname'],['SE','Sweden'], ['CH','Switzerland'],['SY','Syria'],['TW','Taiwan'],['TJ','Tajikistan'], ['TZ','Tanzania'],['TH','Thailand'],['TL','Timor-Leste'], ['TG','Togo'],['TO','Tonga'],['TT','Trinidad and Tobago'], ['TN','Tunisia'],['TR','Turkey'],['TM','Turkmenistan'], ['TV','Tuvalu'],['UG','Uganda'],['UA','Ukraine'], ['AE','United Arab Emirates'],['GB','United Kingdom'], ['US','United States'],['UY','Uruguay'],['UZ','Uzbekistan'], ['VU','Vanuatu'],['VE','Venezuela'],['VN','Vietnam'], ['YE','Yemen'],['ZM','Zambia'],['ZW','Zimbabwe'] ]; sel.innerHTML = ''; var pg = document.createElement( 'optgroup' ); pg.label = '- Middle East -'; priority.forEach( function(c) { var o = document.createElement( 'option' ); o.value = c[0]; o.text = c[1]; pg.appendChild( o ); }); sel.appendChild( pg ); all.sort( function(a,b){ return a[1].localeCompare(b[1]); } ); var ag = document.createElement( 'optgroup' ); ag.label = '- All Countries -'; all.forEach( function(c) { var o = document.createElement( 'option' ); o.value = c[0]; o.text = c[1]; if ( c[0] === 'US' ) o.selected = true; ag.appendChild( o ); }); sel.appendChild( ag ); })(); // ── Step 4: Connect Google ──────────────────────────────────────────── document.getElementById( 'awb-wiz-connect-next' ).addEventListener( 'click', () => showStep( 5 ) ); document.getElementById( 'awb-wiz-connect-skip' ).addEventListener( 'click', () => showStep( 5 ) ); // ── Step 5: Done ────────────────────────────────────────────────────── document.getElementById( 'awb-wiz-finish' ).addEventListener( 'click', function () { this.disabled = true; ajax( 'awbseo_wizard_complete', {}, res => { const url = res.success && res.data.redirect ? res.data.redirect : dashUrl; window.location.href = url; } ); } ); })(); AWBWIZJS; wp_add_inline_script( 'awbseo-admin', $awb_wiz_js ); ?>