Analog Octave pedals LOVE fundamentals. Everything you do at the point where an Octave starts to glitch out will have a compounding result. Here is the extensive list (in order of effectiveness) that when combined leads to a locked in Octave:
1) Signal Path - Passive bass to octave is ideal. Some active basses have a high pass filter that cuts the fundamental from the signal at lower notes. Some pedals also do this, so try your best to have the Octave first.
2) MAgic Tone Fingers - position your picking hand close to the neck, and slide your finger across the string, rather than pluck it. The general rule is that you play 7th fret and above, but with some practice you can go down to the 5th reliably, and in a few cases down to a Low B (doesn't generate an octave lowers note, but makes a cool TOAN)
3) Darker is better - I use flat wound strings, but round wound with the tone knob rolled back half way works well too, use #1 & 2 to help. If you have an active bass, try to crank the lows, tame the highs and mids a bit.
4) Compression - it does help a bit, volume spikes sometimes throw off the tracking circuit if you have a strong attack.
5) Action - this is more technique than actual action, but if you have a Klanky, Rattling tone going in, you get farts out. Adjust the action only if you can't compensate with your picking hand.
All of this assumes that you have a pedal capable in the first place - some Octavers are just better at tracking, some NEED these tricks, and some just don't go there.